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.
Arqade is a question and answer site for passionate videogamers on all platforms. It only takes a minute to sign up.
Sign up to join this communityDo
/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}]}
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
}
]
}