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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • None
    • Minecraft 1.12, Minecraft 1.12.1 Pre-Release 1, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 17w47b, Minecraft 18w01a, Minecraft 18w02a, Minecraft 18w19b, Minecraft 1.13, Minecraft 1.13.1-pre1, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w43a, Minecraft 18w43b, Minecraft 18w45a, Minecraft 18w46a, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 19w04b, Minecraft 19w07a, Minecraft 19w12b, Minecraft 19w13b, Minecraft 19w14a, Minecraft 19w14b, Minecraft 1.14.3, 19w44a, 1.15 Pre-release 4, 1.15 Pre-release 5, 1.15 Pre-release 6, 1.15 Pre-release 7, 1.15, 1.15.1, 1.15.2, 20w11a, 20w12a, 20w14a, 1.16, 1.16.2, 20w51a, 21w03a, 21w05a, 1.17, 1.17.1
    • None
    • Confirmed
    • (Unassigned)

      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

            Unassigned Unassigned
            jirauser71590 user-f2760 (Inactive)
            Votes:
            12 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: