
# -> Gravity
scoreboard players add @s OverlyRealistic.General.ArbitraryData 1
execute if score @s OverlyRealistic.General.ArbitraryData matches 5.. \
    if block ~ ~-0.7 ~ #overly_realistic:spear_can_passthrough run \
        tp @s ~ ~-0.1 ~
execute if score @s OverlyRealistic.General.ArbitraryData matches 5.. run \
    scoreboard players set @s OverlyRealistic.General.ArbitraryData 0

# -> Add to timer
scoreboard players add @s OverlyRealistic.Player.DownedMotionTime 1

# -> If timer < max then return
execute unless score @s OverlyRealistic.Player.DownedMotionTime matches 4.. run \
    return fail

# -> Reset timer
scoreboard players reset @s OverlyRealistic.Player.DownedMotionTime

# -> Move downed player
tp @p[tag=OverlyRealistic.Player.TempPlayer,sort=arbitrary] ~ ~-0.61 ~

# -> If player is not crawling then operate
execute if score #or.player_is_crawling OverlyRealistic.General.ArbitraryData matches 0 \
    unless block ~ ~-0.7 ~ #overly_realistic:spear_can_passthrough \
    at @p[tag=OverlyRealistic.Player.TempPlayer,sort=arbitrary,distance=..16] run \
        tp ~ ~1 ~
