
# -> Reset adv
advancement revoke @s only overly_realistic:player/player_corpse/player_interact_with_player_corpse

# -> Detect crouching
scoreboard players operation #or.corpse_interact_crouching OverlyRealistic.General.ArbitraryData = @s OverlyRealistic.PredicateValue.IsSneaking

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

# -> Operate on corpse
execute as @e[type=interaction,tag=OverlyRealistic.Entity.PlayerCorpseInteraction,distance=..8] run \
    function overly_realistic:general/downing/player_corpse/corpse_interactions/corpse_interact/corpse_interact

# -> Untag player
tag @s add OverlyRealistic.Player.TempPlayerInteractCorpse
