## Runs every tick while an end_force entity is being absorbed
## Runs from `controller.animation.end_force.absorbing_loop`
## @s = ldz:end_force

## Teleport to face the player
tp ~ ~ ~ facing @p

## Shakes the player's meter if they are already full
tag @p[r=4,tag=ForceFull] add ShakeMeter
tag @p[r=4] remove HideEndForceUI

## Sets the distance property that is queried by the particle to adjust how far it shoots the absorption particles
execute if entity @p[r=5] run event entity @s set_nearest_player_distance_to_5
execute if entity @p[r=4] run event entity @s set_nearest_player_distance_to_4
execute if entity @p[r=3] run event entity @s set_nearest_player_distance_to_3
execute if entity @p[r=2] run event entity @s set_nearest_player_distance_to_2
execute if entity @p[r=1] run event entity @s set_nearest_player_distance_to_1