mojira.dev
MC-147028

/data remove not completely remove empty compound tag from entity item when picked up

How to reproduce

  1. Summoning item with custom tag inside an item, for example:

    /summon item ~ ~ ~ {Item:{id:"gold_ingot",Count:1b,tag:{SpawnXP:5}}}
  2. Run in a repeating command block or function:

    execute as @e[type=item,nbt={Age:3s,Item:{tag:{SpawnXP:5}}}] at @s run data remove entity @s Item.tag.SpawnXP
  3. Make sure you have normal item of gold ingot in your inventory. (16 items for testing)

  4. Then picked up your item that has custom tag
    → ❌ The item doesn't stack together.

Video demonstrating the issue: https://www.youtube.com/watch?v=cGcBXvHKKLQ

Attachments

Comments 6

I have same problems, in /data get that items and in find tag:{}} but it had no tag!!???

You did not specify to remove the tag NBT, but what's inside it; empty compounds/lists are not deleted unless you specifically say they should be deleted.

The thing is though, after the item is saved, the empty tag gets deleted

Then the report should be about that, not that it's different. (either should be removed instantly, or not be removed at all then)

Please add, that it also doesn't stack items with same nbt-tags

[media][media][media]

Still happening in 1.19.2 😕

SteveKunG

(Unassigned)

Confirmed

Commands

/data, /data-remove

Minecraft 19w13b, Minecraft 19w14b, Minecraft 1.14 Pre-Release 1, Minecraft 1.14 Pre-Release 2, Minecraft 1.14 Pre-Release 3, ..., 1.19.4, 23w12a, 23w13a, 1.20.2, 23w44a

Retrieved