Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-236544

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

    XMLWordPrintable

Details

    • Bug
    • Status: Reopened
    • Resolution: Unresolved
    • 1.17.1
    • None
    • Confirmed
    • (Unassigned)

    Description

      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!

      Attachments

        Activity

          People

            Unassigned Unassigned
            TheDiamondPlayables Lando Calrissian
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              CHK: