Mojira Archive
MC-51226

/testfor /clear /testforblock don't work correctly with TAG_LIST with TAG_COMPOUND inside NBT Tag

---------------------- Example 1 (/Clear )------------------------------
1. Type this command to give you a diamond sword with nbt tag

/give @p minecraft:diamond_sword 1 0 {ench:[{id:16,lvl:3}]}

2.Type this command to check for the diamond sword

/clear @p minecraft:diamond_sword 0 0 {ench:[{id:16,lvl:3}]}

3.Notice that it found your diamond sword
4.clear that diamond sword
5. Type this command to give you a normal diamond sword

/give @p minecraft:diamond_sword

6. enchant it with this command

/enchant @p 16 3

7.Type this command to check for the diamond sword ( same as Step 2)
(I think it should found the diamond sword because it has the same nbt tag)

/clear @p minecraft:diamond_sword 0 0 {ench:[{id:16,lvl:3}]}

8.Notice that it didn't find your diamond sword
------------------ Example 2 (testforblock) --------------------------------------
1.place a chest
2.put an item in first slot (this example will use diamond sword)
3.type this command (Change x y z to coordinates)

/testforblock <x> <y> <z> minecraft:chest {Items:[{id:minecraft:diamond_sword}]}

4.Notice that it found the chest
5.type this command (Change x y z to coordinates)

/testforblock <x> <y> <z> minecraft:chest {Items:[{id:minecraft:diamond_sword,Slot:0}]}

6.Notice that it didn't find the chest

Duplicate

Rodchananat

2014-03-14, 04:56 PM

2014-03-14, 05:57 PM

2014-03-14, 05:22 PM

0

1

Unconfirmed

Minecraft 14w11b

-