From af7fed5674ff6a324c863ec3cd634519a5082de6 Mon Sep 17 00:00:00 2001 From: Mark Rapson Date: Tue, 11 Mar 2025 02:36:02 +0000 Subject: [PATCH] AddedChain --- data/wrench/function/raycast/partialbox.mcfunction | 1 + data/wrench/function/raycast/partialbox/chain.mcfunction | 4 ++++ data/wrench/function/rotate/chain_flip.mcfunction | 5 +++++ data/wrench/tags/block/partialbox.json | 1 + 4 files changed, 11 insertions(+) create mode 100644 data/wrench/function/raycast/partialbox/chain.mcfunction create mode 100644 data/wrench/function/rotate/chain_flip.mcfunction diff --git a/data/wrench/function/raycast/partialbox.mcfunction b/data/wrench/function/raycast/partialbox.mcfunction index 4ae8fd6..27fb117 100644 --- a/data/wrench/function/raycast/partialbox.mcfunction +++ b/data/wrench/function/raycast/partialbox.mcfunction @@ -39,3 +39,4 @@ execute if block ~ ~ ~ minecraft:hopper unless score WrenchRedstone WrenchConfig execute if block ~ ~ ~ #minecraft:slabs unless score WrenchSlabs WrenchConfig matches 0 run function wrench:raycast/partialbox/slabs execute if block ~ ~ ~ #minecraft:stairs unless score WrenchStairs WrenchConfig matches 0 run function wrench:raycast/partialbox/stairs execute if block ~ ~ ~ minecraft:end_rod unless score WrenchRods WrenchConfig matches 0 run function wrench:raycast/partialbox/end_rods +execute if block ~ ~ ~ minecraft:chain unless score WrenchRods WrenchConfig matches 0 run function wrench:raycast/partialbox/chain diff --git a/data/wrench/function/raycast/partialbox/chain.mcfunction b/data/wrench/function/raycast/partialbox/chain.mcfunction new file mode 100644 index 0000000..389ec03 --- /dev/null +++ b/data/wrench/function/raycast/partialbox/chain.mcfunction @@ -0,0 +1,4 @@ +#Chain +execute if block ~ ~ ~ minecraft:chain[axis=x] if score py WrenchRaycast matches 7..8 if score pz WrenchRaycast matches 7..8 run function wrench:rotate/chain_flip +execute if block ~ ~ ~ minecraft:chain[axis=y] if score px WrenchRaycast matches 7..8 if score pz WrenchRaycast matches 7..8 run function wrench:rotate/chain_flip +execute if block ~ ~ ~ minecraft:chain[axis=z] if score px WrenchRaycast matches 7..8 if score py WrenchRaycast matches 7..8 run function wrench:rotate/chain_flip diff --git a/data/wrench/function/rotate/chain_flip.mcfunction b/data/wrench/function/rotate/chain_flip.mcfunction new file mode 100644 index 0000000..7567781 --- /dev/null +++ b/data/wrench/function/rotate/chain_flip.mcfunction @@ -0,0 +1,5 @@ +### Flip Chain + +execute as @s[scores={WrenchSuccess=0}] store result score @s WrenchSuccess run fill ~ ~ ~ ~ ~ ~ minecraft:chain[axis=z] replace minecraft:chain[axis=y] +execute as @s[scores={WrenchSuccess=0}] store result score @s WrenchSuccess run fill ~ ~ ~ ~ ~ ~ minecraft:chain[axis=y] replace minecraft:chain[axis=x] +execute as @s[scores={WrenchSuccess=0}] store result score @s WrenchSuccess run fill ~ ~ ~ ~ ~ ~ minecraft:chain[axis=x] replace minecraft:chain[axis=z] \ No newline at end of file diff --git a/data/wrench/tags/block/partialbox.json b/data/wrench/tags/block/partialbox.json index abbeffa..8302391 100644 --- a/data/wrench/tags/block/partialbox.json +++ b/data/wrench/tags/block/partialbox.json @@ -9,6 +9,7 @@ "#minecraft:slabs", "#minecraft:stairs", "minecraft:end_rod", + "minecraft:chain", "minecraft:piston", "minecraft:sticky_piston" ]