Mojira Archive
MC-136352

Tools from creative inventory/crafting don't have Damage:0 set until relog

The bug

Upon dropping an undamaged item it has no Damage:0 tag, so you can't check via commands if the item is not damaged.

How to reproduce

  1. Get a diamond pickaxe from creative mode
  2. Drop it
  3. Run this command:
    /data get entity @e[type=item,limit=1]
    

    → Inside the Item NBTTag there's no {Damage:0} tag

Exiting and re-entering the world writes the {Damage:0} tag to the item (both if on ground on your inventory).