Mojira Archive
MC-236544

"replace" operation of "copy_nbt" item modifier does not work on root tag

For an item modifier, using copy_nbt with "op" set to "replace" and "target" set to "{}" (aka the root NBT) will not work at all.
Or to be more precise: Absolutely nothing happened to the resulting item post-modification.

(You can see this for yourself by installing the attached pack, and use /function pleasefix:this)

Expected: It should work like it normally would with "target" set to other values.

Why this needs to be fixed:
Currently, this is the only way to remove any form of NBT data currently exists in a player.
(by putting the item tag data on a storage, remove it in the storage then using copy_nbt on said storage to root NBT - it's wonky but it works in theory).

If this is not fixed, please add a way to remove NBT for players directly (which would be alot better). Thanks!

Unresolved

Lando Calrissian

2021-09-14, 09:46 AM

2024-04-21, 09:26 PM

3

2

Confirmed

(Unassigned)

command, loot-table

1.17.1, 1.20.5 Release Candidate 2

-