Mojira Archive
MC-48534

Testfor Inventory fails on items with custom NBT data.

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!

Invalid

Sean Harrington

2014-02-14, 10:38 PM

2014-10-05, 11:21 AM

2014-04-16, 02:54 AM

0

1

Unconfirmed

Minecraft 14w07a

-