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

# -> Tag donkey
tag @s add OverlyRealistic.Donkey.HasInventoryEdited

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

# -> Do spoilage
execute if items entity @s horse.0 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "horse.0"}
execute if items entity @s horse.1 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "horse.1"}
execute if items entity @s horse.2 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "horse.2"}
execute if items entity @s horse.3 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "horse.3"}
execute if items entity @s horse.4 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "horse.4"}
execute if items entity @s horse.5 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "horse.5"}
execute if items entity @s horse.6 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "horse.6"}
execute if items entity @s horse.7 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "horse.7"}
execute if items entity @s horse.8 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "horse.8"}
execute if items entity @s horse.9 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "horse.9"}
execute if items entity @s horse.10 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "horse.10"}
execute if items entity @s horse.11 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "horse.11"}
execute if items entity @s horse.12 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "horse.12"}
execute if items entity @s horse.13 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "horse.13"}
execute if items entity @s horse.14 #bundles run function overly_realistic:general/food/food_spoilage/spoil_from_loop/item_bundle_modify {slot: "horse.14"}
