
# --> Spoil [glow item frame]

# -> Do spoilage
execute as @e[type=glow_item_frame] \
    if items entity @s contents #overly_realistic:consumables/all_physical_foods[custom_data~{or_is_food:1b}] \
    unless items entity @s contents *[custom_data~{or_no_edit:1b}] run \
        item modify entity @s contents overly_realistic:food/food_spoil

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