diff --git a/data/lzstools_chisel/function/select/block_macro.mcfunction b/data/lzstools_chisel/function/select/block_macro.mcfunction new file mode 100644 index 0000000..8749286 --- /dev/null +++ b/data/lzstools_chisel/function/select/block_macro.mcfunction @@ -0,0 +1,6 @@ +# No Shulkers +$execute if items entity @s hotbar.$(chosen_slot) #minecraft:shulker_boxes run return fail + +$setblock ~ -64 ~ $(temp_id) +setblock ~ -64 ~ bedrock +$data modify storage lzstools:chisel chosen_block set value "$(temp_id)" \ No newline at end of file diff --git a/data/lzstools_chisel/function/select/check_block.mcfunction b/data/lzstools_chisel/function/select/check_block.mcfunction index 8c15349..c8c21b6 100644 --- a/data/lzstools_chisel/function/select/check_block.mcfunction +++ b/data/lzstools_chisel/function/select/check_block.mcfunction @@ -1,6 +1,2 @@ -# No Shulkers -$execute if items entity @s hotbar.$(chosen_slot) #minecraft:shulker_boxes run return fail -$execute if items entity @s hotbar.$(chosen_slot) #minecraft:air run return fail - -$setblock ~ -64 ~ $(chosen_block) -setblock ~ -64 ~ bedrock \ No newline at end of file +function lzstools_chisel:select/block_macro with storage lzstools:chisel +data remove storage lzstools:chisel temp_id \ No newline at end of file diff --git a/data/lzstools_chisel/function/select/get_block.mcfunction b/data/lzstools_chisel/function/select/get_block.mcfunction index cfaa3cc..1ca549b 100644 --- a/data/lzstools_chisel/function/select/get_block.mcfunction +++ b/data/lzstools_chisel/function/select/get_block.mcfunction @@ -1,2 +1,4 @@ -$data modify storage lzstools:chisel chosen_block set from entity @s Inventory[{Slot:$(chosen_slot)b}].id -function lzstools_chisel:select/check_block with storage lzstools:chisel \ No newline at end of file +$data modify storage lzstools:chisel temp_id set from entity @s Inventory[{Slot:$(chosen_slot)b}].id + +function lzstools_chisel:select/check_block with storage lzstools:chisel +setblock ~ -64 ~ bedrock \ No newline at end of file