updated tags and scoreboards

added sound to action
fixed damage when in offhand
This commit is contained in:
2025-05-15 23:20:41 +01:00
parent e2b221eed0
commit 329f879cd8
133 changed files with 1287 additions and 1284 deletions

View File

@@ -1,22 +1,22 @@
## Get Raycast Target Coords
# Stored Value for Calc
scoreboard players set c16 lz_trowel_raycast 16
scoreboard players set c16 lzt_trowel_raycast 16
# Summon Invisible Entity
summon area_effect_cloud ~ ~ ~ {Radius:0.01,Duration:1,Tags:["RaycastMark"]}
# Pixel Calculations
execute store result score px lz_trowel_raycast run data get entity @e[tag=RaycastMark,sort=nearest,limit=1] Pos[0] 16
scoreboard players operation px lz_trowel_raycast %= c16 lz_trowel_raycast
execute if score px lz_trowel_raycast matches ..-1 run scoreboard players add px lz_trowel_raycast 16
execute store result score px lzt_trowel_raycast run data get entity @e[tag=RaycastMark,sort=nearest,limit=1] Pos[0] 16
scoreboard players operation px lzt_trowel_raycast %= c16 lzt_trowel_raycast
execute if score px lzt_trowel_raycast matches ..-1 run scoreboard players add px lzt_trowel_raycast 16
execute store result score py lz_trowel_raycast run data get entity @e[tag=RaycastMark,sort=nearest,limit=1] Pos[1] 16
scoreboard players operation py lz_trowel_raycast %= c16 lz_trowel_raycast
execute if score py lz_trowel_raycast matches ..-1 run scoreboard players add py lz_trowel_raycast 16
execute store result score py lzt_trowel_raycast run data get entity @e[tag=RaycastMark,sort=nearest,limit=1] Pos[1] 16
scoreboard players operation py lzt_trowel_raycast %= c16 lzt_trowel_raycast
execute if score py lzt_trowel_raycast matches ..-1 run scoreboard players add py lzt_trowel_raycast 16
execute store result score pz lz_trowel_raycast run data get entity @e[tag=RaycastMark,sort=nearest,limit=1] Pos[2] 16
scoreboard players operation pz lz_trowel_raycast %= c16 lz_trowel_raycast
execute if score pz lz_trowel_raycast matches ..-1 run scoreboard players add pz lz_trowel_raycast 16
execute store result score pz lzt_trowel_raycast run data get entity @e[tag=RaycastMark,sort=nearest,limit=1] Pos[2] 16
scoreboard players operation pz lzt_trowel_raycast %= c16 lzt_trowel_raycast
execute if score pz lzt_trowel_raycast matches ..-1 run scoreboard players add pz lzt_trowel_raycast 16
# Remove Entity
kill @e[tag=RaycastMark,sort=nearest,limit=1]