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

# -> Tag chest boat
tag @s add OverlyRealistic.ChestBoat.HasInventoryEdited

# -> If chest boat does not have food in inventory then return
execute unless items entity @s container.* #bundles run \
    return fail

# -> Do spoilage
execute if items entity @s container.0 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.0"}
execute if items entity @s container.1 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.1"}
execute if items entity @s container.2 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.2"}
execute if items entity @s container.3 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.3"}
execute if items entity @s container.4 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.4"}
execute if items entity @s container.5 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.5"}
execute if items entity @s container.6 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.6"}
execute if items entity @s container.7 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.7"}
execute if items entity @s container.8 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.8"}
execute if items entity @s container.9 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.9"}
execute if items entity @s container.10 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.10"}
execute if items entity @s container.11 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.11"}
execute if items entity @s container.12 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.12"}
execute if items entity @s container.13 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.13"}
execute if items entity @s container.14 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.14"}
execute if items entity @s container.15 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.15"}
execute if items entity @s container.16 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.16"}
execute if items entity @s container.17 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.17"}
execute if items entity @s container.18 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.18"}
execute if items entity @s container.19 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.19"}
execute if items entity @s container.20 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.20"}
execute if items entity @s container.21 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.21"}
execute if items entity @s container.22 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.22"}
execute if items entity @s container.23 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.23"}
execute if items entity @s container.24 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.24"}
execute if items entity @s container.25 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.25"}
execute if items entity @s container.26 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "container.26"}
