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

In NBT paths, a list with an index cannot be followed by a compound

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • Minecraft 18w46a, Minecraft 18w47a, Minecraft 18w47b
    • None
    • Confirmed

      The bug

      When specifying an NBT path you're unable to let a compound be followed by a list after specifying the index.

      Examples

      (1) /execute if data entity @s SelectedItem{id:"minecraft:stone"}
      (2) /execute if data entity @s Inventory[0]{id:"minecraft:stone"}
      

      (1) is allowed and tests whether the SelectedItem of the player is stone, (2) is not allowed but should test whether the first compound in the Inventory list has an id of minecraft:stone.

            boq [Mojang] Bartosz Bok
            AlexMCool Alex³
            Votes:
            4 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: