
# --> Spoil [preparation plate]

# -> Do spoilage
execute as @e[type=block_display,tag=OverlyRealistic.Block.PreparationPlate,x=0] \
    on passengers \
    if entity @s[type=item_display] \
    if items entity @s contents #overly_realistic:consumables/all_physical_foods \
    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_43_a 1t
