
# -> Temp tag
tag @s add OverlyRealistic.Player.TempPlayer

# -> Remove downed player parent ent
execute as @e[type=block_display,tag=OverlyRealistic.DownedPlayerParentEnt] \
    if score @s OverlyRealistic.Player.DeathID = @p[tag=OverlyRealistic.Player.TempPlayer,sort=arbitrary] OverlyRealistic.Player.DeathID \
    at @s run \
        function overly_realistic:general/downing/downing_parent_ent_remove

# -> Remove attributes
attribute @s movement_speed modifier remove overly_realistic:downed_player_movement_speed
attribute @s jump_strength modifier remove overly_realistic:downed_player_jump_strength
attribute @s gravity base reset

# -> Remove tag
tag @s remove OverlyRealistic.Player.TempPlayer

# -> Kill player
kill @s
