
# --> Crafting 0

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

# -> Spoil food
execute if items entity 00000001-0000-002b-0000-00010000002b contents #bundles \
    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.crafting.0 from entity 00000001-0000-002b-0000-00010000002b contents

# --> Crafting 1

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

# -> Spoil food
execute if items entity 00000001-0000-002b-0000-00010000002b contents #bundles \
    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.crafting.0 from entity 00000001-0000-002b-0000-00010000002b contents

# --> Crafting 2

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

# -> Spoil food
execute if items entity 00000001-0000-002b-0000-00010000002b contents #bundles \
    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.crafting.0 from entity 00000001-0000-002b-0000-00010000002b contents

# --> Crafting 3

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

# -> Spoil food
execute if items entity 00000001-0000-002b-0000-00010000002b contents #bundles \
    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.crafting.0 from entity 00000001-0000-002b-0000-00010000002b contents
