
# -> Decrease cooldown
execute if score @s OverlyRealistic.World.CampfireRainCooldown matches 1.. run \
    scoreboard players remove @s OverlyRealistic.World.CampfireRainCooldown 1

# -> If cooldown >= 1 then return
execute if score @s OverlyRealistic.World.CampfireRainCooldown matches 1.. run \
    return fail

# -> If campfire is exposed to the sky then return and extinguish campfire
execute unless function overly_realistic:mobs_general/sky_check/is_exposed_to_sky run \
    return run \
        function overly_realistic:general/campfires/campfire_extinguish

# -> Set cooldown
scoreboard players set @s OverlyRealistic.World.CampfireRainCooldown 2
