## Runs the levitation effects on the player for the levitation tube
## Run from `controller.animation.leviation_tube.levitation_effects`
## @s = player

execute as @a[x=~-3,y=~0,z=~-3,dx=5,dy=46,dz=5] run titleraw @s[tag=!HideElevatorHint] actionbar {"rawtext": [{"translate":"text.hint.levitate"}]}
# effect @a[x=~-3,y=~0,z=~-3,dx=5,dy=46,dz=5] levitation 0
# effect @a[x=~-3,y=~0,z=~-3,dx=5,dy=46,dz=5] slow_falling 0

## PLAYER LOOKS UP
# execute as @a[x=~-2.5,y=~0,z=~-2.5,dx=4,dy=44,dz=4,rx=15] run effect @s slow_falling 0
execute as @a[x=~-2.5,y=~4,z=~-2.5,dx=4,dy=40,dz=4,rx=15] run effect @s levitation 1 4 true
execute as @a[x=~-2.5,y=~0,z=~-2.5,dx=4,dy=3,dz=4,rx=-30] run effect @s levitation 1 4 true

## PLAYER LOOKS UP & JUMPING
# execute as @p[tag=Jumping,x=~-2.5,y=~0,z=~-2.5,dx=4,dy=44,dz=4,rx=-15,rxm=-90] run effect @p[tag=Jumping,dx=5,dy=44,dz=5,rx=-45,rxm=-90] levitation 2 8 true

## PLAYER LOOKS DOWN
execute as @a[x=~-2.5,y=165,z=~-2.5,dx=4,dy=1,dz=4] run effect @s levitation 0
execute as @a[x=~-2.5,y=~0,z=~-2.5,dx=4,dy=46,dz=4,rxm=15] run effect @s levitation 0
execute as @a[x=~-2.5,y=~0,z=~-2.5,dx=4,dy=52,dz=4] run effect @s slow_falling 1 0 true