
# -> Move to surface
execute positioned over motion_blocking_no_leaves run \
    tp ~ ~ ~

# -> If player is not on the surface then return and set loop value
execute unless block ~ ~-1 ~ air run \
    return run \
        scoreboard players set #or.position_set_success OverlyRealistic.General.ArbitraryData 2
execute unless loaded ~ ~ ~ run \
    return run \
        scoreboard players set #or.position_set_success OverlyRealistic.General.ArbitraryData 2

# -> Set success
execute unless score #or.position_set_success OverlyRealistic.General.ArbitraryData matches 2 run \
    scoreboard players set #or.position_set_success OverlyRealistic.General.ArbitraryData 1

# -> Untag player
tag @s remove OverlyRealistic.Player.PlayerMustMoveToSurface

# -> Remove temp effects
effect clear @s slow_falling
