
# -> If player is looking upwards while it is raining then add to thirst
#execute if score #or.is_raining_thundering OverlyRealistic.General.ArbitraryData matches 1 \
    unless biome ~ ~ ~ #overly_realistic:has_no_rainfall \
    if entity @s[x_rotation=-90..-60,scores={OverlyRealistic.PredicateValue.IsExposedToSkyLight=1,OverlyRealistic.Player.Stats.Thirst=..99}] \
    anchored eyes \
    positioned ^ ^ ^ \
    if function overly_realistic:mobs_general/sky_check/is_exposed_to_sky_fast run \
        function overly_realistic:players/thirst/add_1_hydration

# -> If player has low hygiene then display particles
execute if score @s OverlyRealistic.Player.Stats.Hygiene matches 0..15 run \
    particle dust{color:[0.000,0.361,0.047],scale:0.4} ~ ~0.5 ~ 0.3 1 0.3 0.01 5 normal @a[distance=..16]

# -> If player has <= 0 max stamina then reset it
execute if score @s OverlyRealistic.Player.Stats.MaxStamina matches ..0 \
    store result score @s OverlyRealistic.Player.Stats.MaxStamina run \
        random value 60..100
