mojira.dev
MC-61768

Testfor command not working with the equipment tag

Try this command after you spawn a skeleton:
/testfor @e[type=Skeleton] {Equipment:[{id:bow}]}
It will then say something like: Skeleton did not match datatag.
Even though it has a bow in it's hand.

Comments 6

Your command is incorrect. You need the full item name in quotes:

/testfor @e {Equipment:[{id:"minecraft:bow"}]}

no that's not required
try

testfor @e[type=Skeleton] {Equipment:[{id:bow},{},{},{},{}]}

FVBico, your command doesn't work either. The 'minecraft:' isn't required in give commands, but when using testfor, the json must match the entity's NBT data exactly.

I said try, I didn't test it myselve yet, but that also should no matter

Try something like this: /testfor @e[type=Skeleton] {Equipment:[0:{id:"minecraft:bow",Damage:0s,Count:1b}]}

Avstar is correct. The full command you are looking for is: /testfor @e[type=Skeleton] {Equipment:[{id:"minecraft:bow"}]}. I have tested the command myself and it works.

Benjamin Aaron Cole

(Unassigned)

Unconfirmed

Minecraft 14w28b

Retrieved