
# -> Increase timer
scoreboard players add @s OverlyRealistic.Player.ExtremeTemperatureTimer 1

# -> If timer isnt over 10 (5s) then return
execute unless score @s OverlyRealistic.Player.ExtremeTemperatureTimer matches 10.. run \
    return fail

# -> Reset timer
scoreboard players set @s OverlyRealistic.Player.ExtremeTemperatureTimer 0

# -> If temperature is too hot then return and damage
execute if score @s OverlyRealistic.Player.Stats.Temperature matches 100 run \
    return run \
        damage @s 0.6 on_fire

# -> Else, damage from cold
damage @s 0.6 freeze