Files
minecraft_lzstools/data/lzstools_wrench/function/rotate/partialbox/crafter/click.mcfunction
T
lzstealth 0e84867f0a 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

21 lines
3.1 KiB
MCFunction

## Face Click Crafter
# Get Raycast Target Coords
function lzstools_wrench:raycast/target_coords
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=-45..45] if score py lzt_wrench_raycast matches 15 store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[orientation=up_south] replace
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=45..135] if score py lzt_wrench_raycast matches 15 store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[orientation=up_west] replace
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=135..-135] if score py lzt_wrench_raycast matches 15 store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[orientation=up_north] replace
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=-135..-45] if score py lzt_wrench_raycast matches 15 store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[orientation=up_east] replace
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=-45..45] if score py lzt_wrench_raycast matches 0 store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[orientation=down_north] replace
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=45..135] if score py lzt_wrench_raycast matches 0 store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[orientation=down_east] replace
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=135..-135] if score py lzt_wrench_raycast matches 0 store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[orientation=down_south] replace
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=-135..-45] if score py lzt_wrench_raycast matches 0 store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[orientation=down_west] replace
$execute as @s[scores={lzt_wrench_success=0}] if score pz lzt_wrench_raycast matches 0 store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[orientation=north_up] replace
$execute as @s[scores={lzt_wrench_success=0}] if score px lzt_wrench_raycast matches 15 store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[orientation=east_up] replace
$execute as @s[scores={lzt_wrench_success=0}] if score pz lzt_wrench_raycast matches 15 store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[orientation=south_up] replace
$execute as @s[scores={lzt_wrench_success=0}] if score px lzt_wrench_raycast matches 0 store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[orientation=west_up] replace
# Otherwise, Flip
execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run function lzstools_wrench:rotate/partialbox/crafter/flip with storage lzstools:wrench