#function untwo:proj_sys/motion/loop


#次ブロックが空気ならテレポート、ヒットしたらTag追加
tp @s ^ ^ ^0.5

#Blockにあたったか
execute store result score #&proj.hit untwo.temp.0 at @s run function untwo:proj_sys/pos_check/5
execute if score #&proj.hit untwo.temp.0 matches 1.. run tag @s add untwo.proj.hit
execute if score @s untwo.proj.age matches 5.. positioned ~-0.5 ~-0.5 ~-0.5 if entity @e[dx=0,type=#untwo:item/shield/proj/powder] run tag @s add untwo.proj.hit
#テレポートを中止
execute if score #&proj.hit untwo.temp.0 matches 1.. run tp @s ~ ~ ~
