I'm trying to detect a chest with coal blocks and I entered in:

/testforblock -673 57 -195 chest 2 {Items:[{id:173s,Damage:0s,Slot:1b,Count:1b}]}

But below that it says:

-673,57,-195 did not have the required NBT keys

I'm running Minecraft 1.8.


Item IDs are saved in 1.8+ as strings containing the name IDs. You should not be using numerical IDs anymore.

/testforblock -673 57 -195 chest 2 {Items:[{id:"minecraft:coal_block",Damage:0s,Slot:1b,Count:1b}]}
| improve this answer | |
  • it still says that -673,57,-195 did not have the required NBT keys – phoenix Feb 26 '16 at 23:56
  • 1
    @phoenix And there is a coal block in slot 1 (keep in mind that slot numbers are offset by 1; 0 means the very first visual slot) with a stack-size of exactly 1? The command works fine for me when those requirements are met. – Skylinerw Feb 26 '16 at 23:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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