
# -> If surrounded by spoilage preventation then return and add to time
execute unless score @s OverlyRealistic.World.BlockFreezeTimeForSpoilage matches 3.. \
    if predicate overly_realistic:world/containers/prevent_spoil_surrounded run \
        return run \
            scoreboard players add @s OverlyRealistic.World.BlockFreezeTimeForSpoilage 1

# -> Reset time
scoreboard players reset @s OverlyRealistic.World.BlockFreezeTimeForSpoilage

# -> Do spoilage
item modify block ~ ~ ~ contents overly_realistic:food/food_spoil
