Mark Rapson 329f879cd8 updated tags and scoreboards
added sound to action
fixed damage when in offhand
2025-05-15 23:20:41 +01:00

9 lines
979 B
MCFunction

## Face Player NESW
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=-45..45] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[facing=north] replace
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=45..135] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[facing=east] replace
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=135..-135] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[facing=south] replace
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=-135..-45] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[facing=west] replace
# Otherwise, Flip
execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run function lzstools_wrench:rotate/nesw/flip with storage lzstools:wrench