0

I have been trying to figure this one for about an hour now, yet I still can find out how to detect cocoa beans in a player inventory in 1.11.2. The command I used was:

/testfor awesomeianman {Inventory:[{id:"minecraft:dye",Damage:3}]}

Whenever I tried this, it didn't have an output! Could someone please help me, and tell me if the command is completely wrong?

1

1 Answer 1

1

When testing for pre-existing data, you must specify that data as it's saved. The Damage tag is saved as a short, so you append the numerical value with an "s":

/testfor awesomeianman {Inventory:[{id:"minecraft:dye",Damage:3s}]}
2
  • wait, so I just tried this, nothing happened. are you sure this is for 1.11.2? Commented Apr 15, 2017 at 2:45
  • @BACONISDABEST2COOL4U Works fine for me, provided I replace your name with mine. Ensure your command block is actually activating, and provide any errors it gives.
    – Skylinerw
    Commented Apr 15, 2017 at 4:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.