How do I /give a chest that has items already inside of it? I know you can do it because of mcDungeon, but I can't seem to get it to work whenever I try it myself.

Minecraft version 1.9.4.

1 Answer

The BlockEntityTag compound holds potential tile data for the item's tile entity variant. For example, the following provides a chest that has 1 stone in the first slot of the chest when placed:

/give @p minecraft:chest 1 0 {BlockEntityTag:{Items:[{id:"minecraft:stone",Count:1b,Slot:0b}]}}