Mojira Archive
MC-120371

Data types and formatting are not corrected within items' tag NBT

The item data type (byte, int, short, float, double, string, long, int array, byte array, long array) are not corrected within item data's tag tag.

Using

/give @s minecraft:diamond_sword{Unbreakable:1}

should correct the Unbreakable tag to a byte (1b), but it instead just saves it as an integer (it will still function correctly though).

This affects every tag within item's tag tag.
This should be solvable without breaking custom item tags.

Steps to reproduce:

  1. Use
    /give @s minecraft:diamond_sword{Unbreakable:1}
  2. Use
    /say @s[nbt={Inventory:[{tag:{Unbreakable:1b}}]}]
  3. Notice failing command
  4. Use
    /say @s[nbt={Inventory:[{tag:{Unbreakable:1}}]}]
  5. Notice successful command
  6. Remove the diamond sword
  7. Use
    /give @s minecraft:diamond_sword{Unbreakable:1b}
  8. Use
    /say @s[nbt={Inventory:[{tag:{Unbreakable:1b}}]}]
  9. Notice successful command
  10. Use
    /say @s[nbt={Inventory:[{tag:{Unbreakable:1}}]}]
  11. Notice failing command
  12. Even though it's the exact same tag, the commands fail/succeed depending on the give command, unlike testing for tags outside of the tag tag