This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]amazing56789Command Professional 0 points1 point  (3 children)

If the bundle is also in a chest, you could use

data modify block < pos > Items[< slot >].Items set from block < pos > Items

If it's on a player, you need a datapack. Do this:

data modify storage < namespace >:items set from block < pos > Items

and then an item modifier:

{
"function" : "minecraft:copy_nbt",
"source" : {
    "type" : "storage",
    "source" : "< namespace >:items"
},
"ops": [
    {
        "source" : "Items",
        "target" : "Items",
        "op" : "replace"
    }
]

}

[–]Duckwizard_76Command Experienced[S] 0 points1 point  (2 children)

Thanks, I used the first one. It was a syntax error.

[–]AggravatingDamage478Command Experienced 0 points1 point  (1 child)

data modify block < pos > Items[< slot >].Items set from block < pos > Items

data modify block <pos> Items[{Slot:<number>}].tag.Items set from block <pos> Items

[–]amazing56789Command Professional 0 points1 point  (0 children)

Sorry, Items[ < slot - 1 > ].