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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 18w19b
    • Minecraft 18w19a
    • Confirmed

      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:[{}]}]
      

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

              Created:
              Updated:
              Resolved:
              CHK: