Mojira Archive
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