mojira.dev
MC-87155

I cannot test for armor stands with specific items.

I have a concept where I want to be able to test for any armor stands within a radius of 10 with a tripwire hook. I originally had:

/testfor @e[type=ArmorStand,r=10] {Equipment:[{id:tripwire_hook}]}

And this worked.
However, with the newer 1.9 snapshots came a new format for armor stands. So I edited accordingly and got this:

/testfor @e[type=ArmorStand,r=10] {HandItems:[{id:tripwire_hook},{}],ArmorItems:[{},{},{},{},]}

However, I was unable to get this to work in 15w34d. I tried the old format but that didn't work either. I am pretty sure this is a bug however I may be missing something. If so, what is it?

Comments 2

This works for me:

/testfor @e[type=ArmorStand,r=5] {HandItems:[{id:"minecraft:tripwire_hook"}]}

Oh haha silly me! Thanks!

Nate Eng

(Unassigned)

Unconfirmed

Minecraft 15w34d

Retrieved