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

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • Minecraft 18w19a
    • Minecraft 18w19b
    • 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

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

              Dates

                Created:
                Updated:
                Resolved:
                CHK: