
# -> Store item & modify it
item replace entity 00000001-0000-002b-0000-00010000002b contents from entity @s player.cursor

# -> Spoil food
execute if data entity 00000001-0000-002b-0000-00010000002b item.components."minecraft:bundle_contents"[{components:{"minecraft:max_damage":10000}}] run \
    data modify entity 00000001-0000-002b-0000-00010000002b item.components."minecraft:bundle_contents"[].components."minecraft:damage" set value 10000

# -> Restore item
item replace entity @s player.cursor from entity 00000001-0000-002b-0000-00010000002b contents
