
# -> Tag player
tag @s add OverlyRealistic.Player.IsDowned
tag @s add OverlyRealistic.Player.HasBeenDownedBefore

# -> Create death ID
execute store result score @s OverlyRealistic.Player.DeathID run \
    scoreboard players add #or.global OverlyRealistic.Player.DeathID 1

# -> Create ents
execute positioned ~ ~0.615 ~ summon block_display run \
    function overly_realistic:general/downing/downing_ents

# -> Set death timer
scoreboard players set @s OverlyRealistic.Player.DeathTimer 2400

# -> Attributes
attribute @s movement_speed modifier add overly_realistic:downed_player_movement_speed -100.0 add_value
attribute @s jump_strength modifier add overly_realistic:downed_player_jump_strength -100.0 add_value
attribute @s gravity base set 0

# -> Start loop
schedule function overly_realistic:general/downing/downing_main_1t 1t append