mojira.dev
MC-50508

NBT keys of chests do not work properly

NBT keys do not work properly in case of chests. When you do create a chest with such command:

setblock #x #y #z chest 0 replace {Items:[{Slot:0b,id:torch}]}

And test it with command:

testforblock #x #y #z chest 0 {Items:[{Slot:0b,id:torch}]}

It would not return true value. It will show you this:

The block at #x,#y,#z did not have the required NBT keys.

Hope you'll do something with it.

Linked issues

Comments 8

Are you sure the commands you've entered are correct ?

What is incorrect? You can instruct me.

Still doesn't work, when used these:

setblock ~2 ~ ~ chest 5 replace {Items:[{Slot:0b,id:1b}]}
testforblock ~1 ~ ~ chest 5 {Items:[{Slot:0b,id:1b}]}

Positions' recalls are all right, the error says:

The block at -643,4,-559 did not have the required NBT keys.

Should be

{Items:[0:{Slot:0b,id:minecraft:stone}]}

A'right, it works fine now. But where from should I have know that I must use this 0: before brackets? It's not written on minecraft wiki.

That is how the NBT structure is. I use /blockdata to see this.

Wojciech Drzymała

(Unassigned)

Unconfirmed

Minecraft 14w10c

Retrieved