
# -> Set success
scoreboard players set #or.campfire_count_success OverlyRealistic.General.ArbitraryData 1

# -> Tag campfire
tag @s add OverlyRealistic.Campfire.HasInventoryEdited

# -> If campfire does not have food in inventory then return
execute unless data block ~ ~ ~ {Items:[{}]} run \
    return fail

# -> Modify items
execute if data block ~ ~ ~ {Items:[{Slot:0b,components:{"minecraft:max_damage":10000}}]} run \
    function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_modify_from_campfire_0
execute if data block ~ ~ ~ {Items:[{Slot:1b,components:{"minecraft:max_damage":10000}}]} run \
    function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_modify_from_campfire_1
execute if data block ~ ~ ~ {Items:[{Slot:2b,components:{"minecraft:max_damage":10000}}]} run \
    function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_modify_from_campfire_2
execute if data block ~ ~ ~ {Items:[{Slot:3b,components:{"minecraft:max_damage":10000}}]} run \
    function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_modify_from_campfire_3
