mojira.dev
MC-102407

Testfor does not work with dropped items that have a damage value

There is an issue with testing for dropped items with a damage value that seems to have reappeared after being fixed in the past. I entered '/testfor @e[type=Item] {Item:{id:minecraft:sand,Damage:1s,Count:1}}' next to some dropped red sand and it gave the error message 'item.tile.sand.red did not match the required data structure'. This should have found the item.

Update: This seems to work in command blocks but still outputs an error message if typed in the chat bar.

Linked issues

Comments 1

Try

/testfor @e[type=Item] {Item:{id:minecraft:sand,Damage:1s,Count:1b}}

You have to put a b after any Count tag.

Also, this duplicates MC-59035.

Ben Standen

(Unassigned)

Unconfirmed

Minecraft 1.9.4

Retrieved