
# --> Spoil [player, cursor]

# -> Do spoilage
execute as @a \
    if items entity @s player.cursor #overly_realistic:consumables/all_physical_foods[custom_data~{or_is_food:1b}] \
    unless items entity @s player.cursor *[custom_data~{or_no_edit:1b}] run \
        item modify entity @s player.cursor overly_realistic:food/food_spoil
execute as @a \
    if items entity @s player.cursor #bundles run \
        function overly_realistic:general/food/food_spoilage/spoil_from_loop/spoil_14_b

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