
# --> Spoil [campfire]

# -> [WIP] return & schedule next spoilage
return run \
    schedule function overly_realistic:general/food/food_spoilage/spoil_from_loop/spoil_34_a 1t

# -> Reset success
scoreboard players set #or.campfire_count_success OverlyRealistic.General.ArbitraryData 0

# -> Do spoilage
execute as @e[type=marker,tag=!OverlyRealistic.Campfire.HasInventoryEdited,tag=OverlyRealistic.CampfireBlock,limit=4,sort=arbitrary,x=0] \
    at @s run \
        function overly_realistic:general/food/food_spoilage/spoil_from_loop/spoil_33_b

# -> If success = 1 then return and loop
execute if score #or.campfire_count_success OverlyRealistic.General.ArbitraryData matches 1 run \
    return run \
        schedule function overly_realistic:general/food/food_spoilage/spoil_from_loop/spoil_33_a 1t

# -> Schedule next spoilage
schedule function overly_realistic:general/food/food_spoilage/spoil_from_loop/spoil_34_a 1t
