
# --> Spoil [basket, bundles]

# -> Do spoilage
execute as @e[type=interaction,tag=OverlyRealistic.Block.Basket,x=0] \
    on passengers \
    if entity @s[type=item_display,tag=OverlyRealistic.Block.Basket_BasketItem] \
    if items entity @s contents #bundles \
    if data entity @s item.components."minecraft:bundle_contents"[{components:{"minecraft:max_damage":10000}}] run \
        data modify entity @s item.components."minecraft:bundle_contents"[].components."minecraft:damage" set value 10000

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