execute as @s[level=..5] unless entity @s[distance=..3.5] run tag @s add end_raycast
execute as @s[level=6..10] unless entity @s[distance=..5] run tag @s add end_raycast
execute as @s[level=11..20] unless entity @s[distance=..7] run tag @s add end_raycast
execute as @s[level=21..30] unless entity @s[distance=..10] run tag @s add end_raycast
execute as @s[level=31..40] unless entity @s[distance=..12] run tag @s add end_raycast
execute as @s[level=41..60] unless entity @s[distance=..16] run tag @s add end_raycast
execute as @s[level=61..80] unless entity @s[distance=..28] run tag @s add end_raycast
execute as @s[level=81..100] unless entity @s[distance=..50] run tag @s add end_raycast
execute as @s[level=101..150] unless entity @s[distance=..30] run tag @s add end_raycast
execute unless entity @s[distance=..100] run tag @s add end_raycast

execute unless block ~ ~ ~ #svm_ep:no_physical_hitbox run tag @s add end_raycast
execute if entity @e[tag=!executor,dx=0,type=!#svm_ep:technical] run tag @s add end_raycast2
execute as @s[tag=end_raycast] positioned ~ ~1 ~ align xyz positioned ~0.5 ~0.5 ~0.5 run function svm_ep:power/fire/place_fire
execute as @s[tag=end_raycast] positioned ~ ~2 ~ align xyz positioned ~0.5 ~0.5 ~0.5 run function svm_ep:power/fire/place_fire
execute as @s[tag=end_raycast] positioned ^ ^ ^-0.25 align xyz positioned ~0.5 ~0.5 ~0.5 run function svm_ep:power/fire/place_fire
execute as @s[tag=end_raycast2] at @e[tag=!executor,dx=0,type=!#svm_ep:technical,limit=1,sort=nearest] positioned ~ ~0.25 ~ align xyz positioned ~0.5 ~0.5 ~0.5 run function svm_ep:power/fire/place_fire
tag @s[tag=end_raycast2] add end_raycast
execute as @s[tag=!end_raycast] positioned ^ ^ ^0.15 run function svm_ep:power/fire/flame/raycast