Fixed blocks not being removed with Trowel
Removed unneeded tags Added clean trowel data after use
This commit is contained in:
parent
329f879cd8
commit
6b4033e081
@ -1,2 +1,2 @@
|
||||
# Place Leaves
|
||||
$setblock ~ ~ ~ $(chosen_block)[persistent=true] keep
|
||||
$execute as @s store result score @s lzt_trowel_success setblock ~ ~ ~ $(chosen_block)[persistent=true] keep
|
@ -1,5 +1,5 @@
|
||||
# Place NESW
|
||||
$execute as @s[y_rotation=-45..45] store result score @s lzt_trowel_raycast run setblock ~ ~ ~ $(chosen_block)[facing=north] keep
|
||||
$execute as @s[y_rotation=45..135] store result score @s lzt_trowel_raycast run setblock ~ ~ ~ $(chosen_block)[facing=east] keep
|
||||
$execute as @s[y_rotation=135..-135] store result score @s lzt_trowel_raycast run setblock ~ ~ ~ $(chosen_block)[facing=south] keep
|
||||
$execute as @s[y_rotation=-135..-45] store result score @s lzt_trowel_raycast run setblock ~ ~ ~ $(chosen_block)[facing=west] keep
|
||||
$execute as @s[y_rotation=-45..45] store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[facing=north] keep
|
||||
$execute as @s[y_rotation=45..135] store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[facing=east] keep
|
||||
$execute as @s[y_rotation=135..-135] store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[facing=south] keep
|
||||
$execute as @s[y_rotation=-135..-45] store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[facing=west] keep
|
@ -1,7 +1,7 @@
|
||||
# Place NESWUD
|
||||
$execute as @s[x_rotation=45..90] store result score @s lzt_trowel_raycast run setblock ~ ~ ~ $(chosen_block)[facing=up] keep
|
||||
$execute as @s[x_rotation=-90..-45] store result score @s lzt_trowel_raycast run setblock ~ ~ ~ $(chosen_block)[facing=down] keep
|
||||
$execute as @s[x_rotation=-45..45, y_rotation=-45..45] store result score @s lzt_trowel_raycast run setblock ~ ~ ~ $(chosen_block)[facing=north] keep
|
||||
$execute as @s[x_rotation=-45..45, y_rotation=45..135] store result score @s lzt_trowel_raycast run setblock ~ ~ ~ $(chosen_block)[facing=east] keep
|
||||
$execute as @s[x_rotation=-45..45, y_rotation=135..-135] store result score @s lzt_trowel_raycast run setblock ~ ~ ~ $(chosen_block)[facing=south] keep
|
||||
$execute as @s[x_rotation=-45..45, y_rotation=-135..-45] store result score @s lzt_trowel_raycast run setblock ~ ~ ~ $(chosen_block)[facing=west] keep
|
||||
$execute as @s[x_rotation=45..90] store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[facing=up] keep
|
||||
$execute as @s[x_rotation=-90..-45] store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[facing=down] keep
|
||||
$execute as @s[x_rotation=-45..45, y_rotation=-45..45] store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[facing=north] keep
|
||||
$execute as @s[x_rotation=-45..45, y_rotation=45..135] store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[facing=east] keep
|
||||
$execute as @s[x_rotation=-45..45, y_rotation=135..-135] store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[facing=south] keep
|
||||
$execute as @s[x_rotation=-45..45, y_rotation=-135..-45] store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[facing=west] keep
|
@ -1,3 +1,3 @@
|
||||
# Place Slabs
|
||||
$execute as @s if score py lzt_trowel_raycast matches 8.. store result score @s lzt_wrench_success run setblock ~ ~ ~ $(chosen_block)[type=top] keep
|
||||
$execute as @s if score py lzt_trowel_raycast matches ..7 store result score @s lzt_wrench_success run setblock ~ ~ ~ $(chosen_block)[type=bottom] keep
|
||||
$execute as @s if score py lzt_trowel_raycast matches 8.. store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[type=top] keep
|
||||
$execute as @s if score py lzt_trowel_raycast matches ..7 store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[type=bottom] keep
|
@ -1,9 +1,18 @@
|
||||
#Setting up the raycasting data.
|
||||
scoreboard players set #distance lzt_trowel_raycast 0
|
||||
tag @s add lzt_trowel_raycast
|
||||
|
||||
#Activating the raycast. This function will call itself until it is done.
|
||||
execute as @e[tag=lzt_trowel_raycast] at @s anchored eyes positioned ^ ^ ^ run function lzstools_trowel:raycast/rayloop
|
||||
execute as @s at @s anchored eyes positioned ^ ^ ^ anchored feet run function lzstools_trowel:raycast/rayloop
|
||||
|
||||
#Raycasting finished, removing tag from the raycaster.
|
||||
tag @s remove lzt_trowel_raycast
|
||||
# Clean Data
|
||||
data remove storage lzstools:trowel inventory
|
||||
data remove storage lzstools:trowel components
|
||||
data remove storage lzstools:trowel damage
|
||||
data remove storage lzstools:trowel slots
|
||||
data remove storage lzstools:trowel blocks
|
||||
data remove storage lzstools:trowel length
|
||||
data remove storage lzstools:trowel temp_slot
|
||||
data remove storage lzstools:trowel temp_id
|
||||
data remove storage lzstools:trowel chosen_index
|
||||
data remove storage lzstools:trowel chosen_block
|
||||
data remove storage lzstools:trowel chosen_slot
|
@ -1,10 +1,8 @@
|
||||
#Setting up the raycasting data.
|
||||
scoreboard players set #distance lzt_wrench_raycast 0
|
||||
tag @s add lzt_wrench_raycast
|
||||
|
||||
#Activating the raycast. This function will call itself until it is done.
|
||||
execute as @e[tag=lzt_wrench_raycast] at @s anchored eyes positioned ^ ^ ^ run function lzstools_wrench:raycast/rayloop
|
||||
execute as @s at @s anchored eyes positioned ^ ^ ^ anchored feet run function lzstools_wrench:raycast/rayloop
|
||||
|
||||
#Raycasting finished, removing tag from the raycaster.
|
||||
tag @s remove lzt_wrench_raycast
|
||||
# Clean Data
|
||||
data remove storage lzstools:wrench block
|
Loading…
x
Reference in New Issue
Block a user