Like the title states, I want to be able to spawn items using a command block, and have them placed into a chest.

And I don't want to replace the chest, I want it to just add my block into the chest.


4 Answers 4



/replaceitem block <x> <y> <z> <slot (if you want to fill the 9th slot of an ender chest with something, change this to slot.enderchest.9)> <item> [data] [dataValue]


This should work: /setblock ~ ~ ~ chest 5 or if it doesnt work try chest 2 {Items:[{id:<item>,Slot:<slot>,Count:<how many>,Damage:0s}]}

  • I tried to put as much of the commands in code formatting as I could, but I don't know Minecraft commands well enough to say what is part of the command and what is instructions.
    – DJ Pirtu
    Jun 7, 2015 at 10:49
  • 1
    Use of numeric id is discouraged since it is obsolete/deprecated in latest versions of Minecraft.
    – Q20
    Sep 10, 2015 at 13:36

Why not just clone a hopper with a certain item that will point to the chest. The only problem I think is you can't really time it well (to me with this idea I filled the chest with one item per tick)


This might be a little roundabout way of looking at it but you could have your chest that already has items in it and attach a hopper that will feed item into it that chest. Then generate a command that will spawn a chest and feed those items of the spawned chest into your untouched chest with the hopper.

Here is a link that will auto generate you a command that will generate a chest with custom items in it. With a Example:

/setblock ~1 ~ ~ chest 0 replace {
Items: [
            id: "stone",
            Slot: 4,
            Count: 1
  • Hi! Unfortunately, answers that contain nothing but links to other sites are not a good fit for our format. See this question for more details.
    – One 2 Many
    Oct 15, 2020 at 14:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .