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

Optional tags gets removed when set to false/0/empty

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 15w35b, Minecraft 1.10.2, Minecraft 16w43a, Minecraft 16w44a, Minecraft 1.11.2, Minecraft 17w14a, Minecraft 17w15a, Minecraft 1.12.2, Minecraft 17w50a, 1.15.2, 1.16 Release Candidate 1, 1.16, 1.16.1, 1.17.1, 21w38a
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      The Bug

      When the CustomNameVisible tag is set to false (0b) the game automatically removes the tag from the NBT data of the Entity. This also affects newly summoned Entities which do not have it by default if it is not true.
      This is a big problem as you cannot test for it then.

      Steps to Reproduce

      • Summon a husk with its "CustomNameVisible" tag set to "0b".
         /summon minecraft:husk ~ ~ ~ {CustomNameVisible:0b}
        
      • Use the data command on the husk to inspect the value of its "CustomNameVisible" tag.
        /data get entity @e[type=minecraft:husk,limit=1,sort=nearest] CustomNameVisible
        

        → Notice how the error message, "Found no elements matching CustomNameVisible" is displayed in the chat, therefore indicating that optional NBT data tags get removed when set to "0", "false", or "empty".

      Expected Behavior

      The expected behavior would be that optional NBT data tags would not get removed when set to "0", "false", or "empty".

        Attachments

        1. MC-87252.mp4
          3.23 MB
        2. MC-87252.png
          MC-87252.png
          589 kB

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              marcono1234 [Mod] Marcono1234
              Votes:
              7 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                CHK: