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

# -> Tag player
tag @s add OverlyRealistic.Player.HasInventoryEdited

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

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