Skip to content

Commit ae5263d

Browse files
committed
Updated to 1.19.4 - Replaced Glow Item Frames with Item Display Entities
1 parent c54ed1f commit ae5263d

21 files changed

+45
-86
lines changed

data/custom_blocks/functions/break/apply_block_info_to_item.mcfunction

100644100755
File mode changed.
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
data modify storage custom_blocks:drop_block id set from entity @s Item.id
2-
data modify storage custom_blocks:drop_block DisplayName set from entity @s Item.tag.display.CustomName
3-
data modify storage custom_blocks:drop_block Lore set from entity @s Item.tag.display.Lore
4-
data modify storage custom_blocks:drop_block CustomModelDataVertical set from entity @s Item.tag.CustomModelDataVertical
5-
data modify storage custom_blocks:drop_block CustomModelData set from entity @s Item.tag.CustomModelData
6-
data modify storage custom_blocks:drop_block CustomModelData set from entity @s Item.tag.CustomModelDataNorm
1+
data modify storage custom_blocks:drop_block id set from entity @s item.id
2+
data modify storage custom_blocks:drop_block DisplayName set from entity @s item.tag.display.CustomName
3+
data modify storage custom_blocks:drop_block Lore set from entity @s item.tag.display.Lore
4+
data modify storage custom_blocks:drop_block CustomModelData set from entity @s item.tag.CustomModelData
5+
data modify storage custom_blocks:drop_block CustomModelData set from entity @s item.tag.CustomModelDataNorm
76
data modify storage custom_blocks:drop_block CustomName set from entity @s CustomName
8-
data modify storage custom_blocks:drop_block Tags set from entity @s Item.tag.BlockProperties.Tags
9-
data modify storage custom_blocks:drop_block SetblockCommand set from entity @s Item.tag.BlockProperties.SetblockCommand
7+
data modify storage custom_blocks:drop_block Tags set from entity @s item.tag.BlockProperties.Tags
8+
data modify storage custom_blocks:drop_block SetblockCommand set from entity @s item.tag.BlockProperties.SetblockCommand

data/custom_blocks/functions/break/spawn_drop.mcfunction

100644100755
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ data remove storage custom_blocks:drop_block Tags
99
data remove storage custom_blocks:drop_block SetblockCommand
1010

1111
# Check If Custom Block Has Been Broken Then Store Block Info In Storage
12-
execute as @e[type=glow_item_frame,tag=customBlock] at @s if block ~ ~ ~ air run tag @s add spawn_drop
13-
execute as @e[type=glow_item_frame,tag=customBlock,tag=spawn_drop,predicate=custom_blocks:is_placer] at @s run function custom_blocks:break/copy_block_info_to_storage
12+
execute as @e[type=item_display,tag=customBlock] at @s if block ~ ~ ~ air run tag @s add spawn_drop
13+
execute as @e[type=item_display,tag=customBlock,tag=spawn_drop] at @s run function custom_blocks:break/copy_block_info_to_storage
1414

1515
# Apply Block Info To Item
16-
execute as @e[type=glow_item_frame,tag=customBlock,tag=spawn_drop] at @s run function custom_blocks:break/apply_block_info_to_item
16+
execute as @e[type=item_display,tag=customBlock,tag=spawn_drop] at @s run function custom_blocks:break/apply_block_info_to_item

data/custom_blocks/functions/item_frame/check_add_item_from_frame.mcfunction

Lines changed: 0 additions & 2 deletions
This file was deleted.

data/custom_blocks/functions/item_frame/check_removed_item_from_frame.mcfunction

Lines changed: 0 additions & 13 deletions
This file was deleted.

data/custom_blocks/functions/item_frame/update_item_in_frame.mcfunction

Lines changed: 0 additions & 8 deletions
This file was deleted.

data/custom_blocks/functions/item_frame/update_item_out_frame.mcfunction

Lines changed: 0 additions & 7 deletions
This file was deleted.

data/custom_blocks/functions/main.mcfunction

100644100755
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
execute as @a run function custom_blocks:place/set_storage
22
function custom_blocks:break/spawn_drop
3-
4-
function custom_blocks:item_frame/check_add_item_from_frame
5-
function custom_blocks:item_frame/check_removed_item_from_frame
Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
1-
data modify entity @s Item.id set from storage custom_blocks:current_block id
2-
data modify entity @s Item.tag.display.CustomName set from storage custom_blocks:current_block DisplayName
3-
data modify entity @s Item.tag.display.Lore set from storage custom_blocks:current_block Lore
1+
data modify entity @s item.id set from storage custom_blocks:current_block id
2+
data modify entity @s item.tag.display.CustomName set from storage custom_blocks:current_block DisplayName
3+
data modify entity @s item.tag.display.Lore set from storage custom_blocks:current_block Lore
44

5-
# Set Model If Normal
6-
execute as @s[tag=!up,tag=!down] run function custom_blocks:place/apply_model_normal
5+
# Set Model
6+
execute as @s run function custom_blocks:place/apply_model
77

8-
# Set Model If Vertical
9-
execute as @s[tag=up,tag=!down] run function custom_blocks:place/apply_model_vertical
10-
execute as @s[tag=!up,tag=down] run function custom_blocks:place/apply_model_vertical
11-
12-
data modify entity @s Item.tag.BlockEntityTag.Lock set value "CustomBlocks:Block"
13-
data modify entity @s Items.tag.BlockProperties.CustomName set from storage custom_blocks:current_block CustomName
14-
data modify entity @s Items.tag.BlockProperties.Tags set from storage custom_blocks:current_block Tags
8+
data modify entity @s item.tag.BlockEntityTag.Lock set value "CustomBlocks:Block"
9+
data modify entity @s item.tag.BlockProperties.CustomName set from storage custom_blocks:current_block CustomName
10+
data modify entity @s item.tag.BlockProperties.Tags set from storage custom_blocks:current_block Tags
1511
data modify entity @s CustomName set from storage custom_blocks:current_block CustomName
16-
data modify entity @s Item.tag.BlockProperties.SetblockCommand set from storage custom_blocks:current_block SetblockCommand
12+
data modify entity @s item.tag.BlockProperties.SetblockCommand set from storage custom_blocks:current_block SetblockCommand
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Non-Vertical Facing
2+
data modify entity @s item.tag.CustomModelData set from storage custom_blocks:current_block CustomModelData
3+
data modify entity @s item.tag.CustomModelDataNorm set from storage custom_blocks:current_block CustomModelData
4+
5+
# Facing up
6+
execute store result score @s[tag=up] cbCalcModel run data get entity @s item.tag.CustomModelData
7+
scoreboard players add @s[tag=up] cbCalcModel 1
8+
execute store result entity @s[tag=up] item.tag.CustomModelData int 1 run scoreboard players get @s cbCalcModel
9+
10+
# Facing down
11+
execute store result score @s[tag=down] cbCalcModel run data get entity @s item.tag.CustomModelData
12+
scoreboard players add @s[tag=down] cbCalcModel 2
13+
execute store result entity @s[tag=down] item.tag.CustomModelData int 1 run scoreboard players get @s cbCalcModel

0 commit comments

Comments
 (0)