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

Command NBT comparisons that include strings or numbers always fail

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: Minecraft 18w19a
    • Fix Version/s: Minecraft 18w19b
    • Labels:
    • Confirmation Status:
      Confirmed

      Description

      Testing for the presence of a compound or the emptiness of a list works as expected; testing for numerical or string values always fails. As such:

      Always fail

      @a[nbt={OnGround:1b}]
      @e[type=item,nbt={Item:{id:"minecraft:stone"}}]
      

      Work as expected

      @a[nbt={}]
      @a[nbt={Inventory:[]}]
      @e[type=item,nbt={Item:{}}]
      @e[nbt={ArmorItems:[{}]}]
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                Jerry31417 Jerry Cheng
              • Votes:
                6 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: