What was supposed to happen was a command block was going to testforblock a chest with a piece of cobblestone in slot 0b called "test"
What happened was that the command block didn't accept the datatag and came up with the error "The block at -764,32,462 did not have the required NBT keys."
Describe what happened here
Steps to Reproduce:
1. place a command block with a chest facing north on top of it
2. type the command
testforblock ~ ~1 ~ minecraft:chest 2 {Items:[0:{Slot:0b,id:4s,Count:1b,Damage:0s,tag:{display:{Name:"test"}}}]}
into the command block
3. rename a piece of cobblestone to "test" using an anvil or the /give command
4. place it in the top left-hand corner of the chest
5. put a comparator sticking outof the command block
5. place a button on the command block and press it
6. check the command blocks previous output
8. the command will be "The block at ...,...,... did not have the required NBT keys."
- duplicates
-
MC-30976 Can't use the NBT tags with testforblock to detect items
- Resolved