Files
minecraft_lzstools/data/lzstools_wrench/function/rotate/partialbox/skulls/click.mcfunction
Mark Rapson 0e84867f0a
All checks were successful
Draft Release / deploy-prod (push) Successful in 4s
Alphabetized tags
Added waterlogged predicate
Added Chain Variants
Added Copper Golems
Added Shelves
Shrunk Ender Chest hitbox

Moved partial box items into their own folder
2025-10-01 16:49:48 +01:00

13 lines
1.2 KiB
MCFunction

## Face Click Heads and Skulls
# Get Raycast Target Coords
function lzstools_wrench:raycast/target_coords
# Heads and skulls don't have full hitboxes, nothing else uses numeric rotation
$execute as @s[scores={lzt_wrench_success=0}] if score pz lzt_wrench_raycast matches 4 store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=0] replace
$execute as @s[scores={lzt_wrench_success=0}] if score px lzt_wrench_raycast matches 11 store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=4] replace
$execute as @s[scores={lzt_wrench_success=0}] if score pz lzt_wrench_raycast matches 11 store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=8] replace
$execute as @s[scores={lzt_wrench_success=0}] if score px lzt_wrench_raycast matches 4 store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=12] replace
# Otherwise, Flip
execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run function lzstools_wrench:rotate/partialbox/skulls/flip with storage lzstools:wrench