Macro error
My game crashes and lags really hard when I do this:
data modify storage quantum:distance_to_target y set from entity @s Pos[1]function eval:ray/cast1 with storage quantum:distance_to_targetcast1
say yoscoreboard players set @s distance_to_target 0$execute positioned ~ $(y) ~ facing entity @p[tag=xlib_target] feet run return run function eval:ray/ray1ray1:
execute as @a[dx=0,gamemode=!spectator,tag=xlib_target] positioned ~-0.99 ~-0.99 ~-0.99 if entity @s[dx=0] run return 1scoreboard players add @s distance_to_target 1execute positioned ^ ^ ^0.5 run return run function eval:ray/ray1