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

Testfor Inventory fails on items with custom NBT data.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • Minecraft 14w07a
    • None
    • Windows 7 Home Premium 64-bit
      Java 1.7 Update 51 64-bit
    • Unconfirmed

      I don't know if this is a bug or I am doing it incorrectly. I am trying run the testfor command to check an inventory for a bow with a custom name and lore. The commands I tried were:

      testfor @p {Inventory:[{Slot:0b,id:"minecraft:bow"}],display:{Name:"Name",Lore:["LORE"]}}

      and

      testfor @p {Inventory:[{Slot:0b,id:"minecraft:bow",display:{Name:"Sniper",Lore:["LORE"]}}]}

      The compator fails to output on both commands stating

      [15:22:15] Harrnutt did not match the required data structure

      Even though I do have a bow with custom name: "Name" and lore: "LORE" in my first inventory slot. Again this may just be a syntax error on my part but I've checked it and believe it should work. Thanks!

            Unassigned Unassigned
            harrnutt Sean Harrington
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: