From a4ef6ca5f03f9c8b647397d01cd44e1e487c5939 Mon Sep 17 00:00:00 2001 From: Mark Rapson Date: Wed, 21 May 2025 21:47:58 +0100 Subject: [PATCH] Chisel do nothing on unbreakable blocks --- data/lzstools_chisel/function/raycast/loop.mcfunction | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/lzstools_chisel/function/raycast/loop.mcfunction b/data/lzstools_chisel/function/raycast/loop.mcfunction index b9545e0..6e9b10d 100644 --- a/data/lzstools_chisel/function/raycast/loop.mcfunction +++ b/data/lzstools_chisel/function/raycast/loop.mcfunction @@ -7,6 +7,9 @@ execute as @s run kill @n[type=minecraft:item,distance=..0.5,y=-65] execute as @s if score @s lzt_chisel_raycast_hit matches 1 run function lzstools_chisel:raycast/hit execute if score @s lzt_chisel_raycast_hit matches 1 run tag @s remove lzstools_chisel_mainhand +# Do nothing is unbreakable block +execute if block ~ ~ ~ #lzstools:unbreakable run return fail + # Advance forward and if nothing found scoreboard players add #distance lzt_chisel_raycast 1 execute if score @s lzt_chisel_raycast_hit matches 0 if score #distance lzt_chisel_raycast matches ..451 positioned ^ ^ ^0.01 run function lzstools_chisel:raycast/loop \ No newline at end of file