9

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.

0
2

Do

/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]

0

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

2
  • 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 '15 at 10:49
  • 1
    Use of numeric id is discouraged since it is obsolete/deprecated in latest versions of Minecraft. – Q20 Sep 10 '15 at 13:36
0

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)

0

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 } ] }

https://minecraftcommand.science/prefilled-chest-generator

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. – ExpertCoder14 Oct 15 '20 at 14:31

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