
# -> Reset adv trigger
advancement revoke @s only overly_realistic:items/consumption/consume_foods_or_liquids_data

# -> Advancement
advancement grant @s only overly_realistic:advancements/livelyhood/eatery

# -> If player's head is in water then deal drowning damage
execute anchored eyes \
    positioned ^ ^ ^ \
    anchored feet \
    if block ~ ~ ~ water run \
        damage @s 3.0 drown

# -> If player is dirty then increase illness chance
execute if score @s OverlyRealistic.Player.Stats.Hygiene matches 0..15 run \
    scoreboard players add @s OverlyRealistic.Player.Stats.IllnessChance 5

# -> If player is ill then add hunger
execute if entity @s[tag=OverlyRealistic.Player.IsSick] run \
    effect give @s hunger 3 2 true
