|
1 | | -# Places The Base Block Armor Stand |
2 | | -execute if block ~ ~ ~ command_block[facing=north] align xyz positioned ~0.5 ~0.5 ~0.5 summon item_display run data merge entity @s {item:{id:"minecraft:stone",Count:1b},brightness:{block:0,sky:15},transformation:{scale:[1.003,1.003,1.003]},Rotation:[0.0f,0.0f],Tags:["customBlock","placing"]} |
3 | | -execute if block ~ ~ ~ command_block[facing=south] align xyz positioned ~0.5 ~0.5 ~0.5 summon item_display run data merge entity @s {item:{id:"minecraft:stone",Count:1b},brightness:{block:0,sky:15},transformation:{scale:[1.003,1.003,1.003]},Rotation:[-180.0f,0.0f],Tags:["customBlock","placing"]} |
4 | | -execute if block ~ ~ ~ command_block[facing=east] align xyz positioned ~0.5 ~0.5 ~0.5 summon item_display run data merge entity @s {item:{id:"minecraft:stone",Count:1b},brightness:{block:0,sky:15},transformation:{scale:[1.003,1.003,1.003]},Rotation:[90.0f,0.0f],Tags:["customBlock","placing"]} |
5 | | -execute if block ~ ~ ~ command_block[facing=west] align xyz positioned ~0.5 ~0.5 ~0.5 summon item_display run data merge entity @s {item:{id:"minecraft:stone",Count:1b},brightness:{block:0,sky:15},transformation:{scale:[1.003,1.003,1.003]},Rotation:[-90.0f,0.0f],Tags:["customBlock","placing"]} |
6 | | -execute if block ~ ~ ~ command_block[facing=up] align xyz positioned ~0.5 ~0.5 ~0.5 summon item_display run data merge entity @s {item:{id:"minecraft:stone",Count:1b},brightness:{block:0,sky:15},transformation:{scale:[1.003,1.003,1.003]},Rotation:[0.0f,90.0f],Tags:["customBlock","placing","up"]} |
7 | | -execute if block ~ ~ ~ command_block[facing=down] align xyz positioned ~0.5 ~0.5 ~0.5 summon item_display run data merge entity @s {item:{id:"minecraft:stone",Count:1b},brightness:{block:0,sky:15},transformation:{scale:[1.003,1.003,1.003]},Rotation:[0.0f,-90.0f],Tags:["customBlock","placing","down"]} |
| 1 | +# Spawns The Item Display |
| 2 | +execute if block ~ ~ ~ command_block[facing=north] align xyz positioned ~0.5 ~0.5 ~0.5 summon item_display run data merge entity @s {item:{id:"minecraft:stone",count:1},brightness:{block:0,sky:15},transformation:{scale:[1.003,1.003,1.003]},Rotation:[0.0f,0.0f],Tags:["customBlock","placing"]} |
| 3 | +execute if block ~ ~ ~ command_block[facing=south] align xyz positioned ~0.5 ~0.5 ~0.5 summon item_display run data merge entity @s {item:{id:"minecraft:stone",count:1},brightness:{block:0,sky:15},transformation:{scale:[1.003,1.003,1.003]},Rotation:[-180.0f,0.0f],Tags:["customBlock","placing"]} |
| 4 | +execute if block ~ ~ ~ command_block[facing=east] align xyz positioned ~0.5 ~0.5 ~0.5 summon item_display run data merge entity @s {item:{id:"minecraft:stone",count:1},brightness:{block:0,sky:15},transformation:{scale:[1.003,1.003,1.003]},Rotation:[90.0f,0.0f],Tags:["customBlock","placing"]} |
| 5 | +execute if block ~ ~ ~ command_block[facing=west] align xyz positioned ~0.5 ~0.5 ~0.5 summon item_display run data merge entity @s {item:{id:"minecraft:stone",count:1},brightness:{block:0,sky:15},transformation:{scale:[1.003,1.003,1.003]},Rotation:[-90.0f,0.0f],Tags:["customBlock","placing"]} |
| 6 | +execute if block ~ ~ ~ command_block[facing=up] align xyz positioned ~0.5 ~0.5 ~0.5 summon item_display run data merge entity @s {item:{id:"minecraft:stone",count:1},brightness:{block:0,sky:15},transformation:{scale:[1.003,1.003,1.003]},Rotation:[0.0f,90.0f],Tags:["customBlock","placing","up"]} |
| 7 | +execute if block ~ ~ ~ command_block[facing=down] align xyz positioned ~0.5 ~0.5 ~0.5 summon item_display run data merge entity @s {item:{id:"minecraft:stone",count:1},brightness:{block:0,sky:15},transformation:{scale:[1.003,1.003,1.003]},Rotation:[0.0f,-90.0f],Tags:["customBlock","placing","down"]} |
8 | 8 |
|
9 | | -# Updates The Base Block To Include All The Block Info From Storage |
| 9 | +# Updates The Item Display To Include All The Block Info From Storage |
10 | 10 | execute as @e[type=item_display,tag=placing] at @s run function custom_blocks:place/apply_block_info_from_storage |
11 | 11 |
|
12 | 12 | # Remove Temporary Tag And Set Base Block |
13 | | -setblock ~ ~ ~ stone |
14 | | -execute as @e[type=item_display,tag=placing] at @s run function custom_blocks:place/set_base_block with storage custom_blocks:current_block BaseBlock |
| 13 | +tag @s remove placing |
| 14 | +$setblock ~ ~ ~ $(value) |
15 | 15 |
|
16 | 16 | # Resets Storage After Player Places Custom Block Or Deselects It |
17 | 17 | execute as @a[gamemode=!creative,predicate=!custom_blocks:selected_placer] run function custom_blocks:place/reset_storage |
0 commit comments