Click on a slot to add or edit an item
Shulker Box (Default)
27 slots
/give @p minecraft:shulker_boxContainers in Minecraft can be given to players with pre-filled items using the container component. This is useful for creating starter kits, treasure, or custom loot. Slot items can carry enchantments too: add them in the slot editor and the command nests them on the contained item.
Container Types:
Loot Tables:
Instead of specific items, you can use a loot table to generate random contents when the container is first opened. This uses the same loot generation as naturally spawning chests.
Build /give commands for containers that already hold items. Fill shulker boxes, chests, barrels, hoppers, dispensers, and droppers with exactly the items you need, then paste the command into Java Edition 1.20.5 and later.
Pre-filled containers are a staple for map makers, kit servers, and organized survival storage. Instead of placing a shulker box and filling it slot by slot in game, the container generator lets you define the exact contents and slot positions, then outputs a single command that produces a ready-to-use container.
Since Minecraft 1.20.5, container contents use the container item component, which replaced the old BlockEntityTag NBT format. This generator writes the modern syntax automatically.
1. Pick a container type: shulker boxes (17 colors), chests, trapped chests, barrels, hoppers, dispensers, or droppers.
2. Click a slot and choose the item that goes in it, then set its stack size.
3. Arrange items in specific slots to control where they appear when the container is opened, or load a loot table instead.
4. Copy the command. It updates in real time, so paste it straight into your game or a command block.
Not every container has the same number of slots. Here is each one you can pre-fill with the container component:
| Container | Slots | Notes |
|---|---|---|
| 27 | Keeps contents when broken; 17 color variants plus uncolored | |
| 27 | Standard storage block | |
| 27 | Emits a redstone signal when opened | |
| 27 | Opens even with a block above it | |
| 5 | Transfers items between containers | |
| 9 | Launches items and projectiles when triggered | |
| 9 | Drops items or feeds into adjacent containers |
Starter kits: pre-fill a shulker box with tools, food, and basic resources, then give it to new players when they join your server.
Loot crates: build reward containers for adventure maps. Dispenser contents make great randomized drops when triggered with redstone.
Organized storage: set up pre-sorted shulker boxes for different resource categories, one for ores, one for building blocks, one for food.
Trapped chest puzzles: use trapped chests with specific items inside to trigger redstone contraptions. The chest emits a signal proportional to how full it is.
A shulker box has 27 slots (3 rows of 9), the same as a regular chest. Unlike chests, shulker boxes keep their contents when broken, which makes them the main portable storage in the game.
No. In vanilla Minecraft, shulker boxes cannot be placed inside other shulker boxes. This stops exponential storage exploits. Bundles can be placed inside shulker boxes, though.
Using the container component, you can pre-fill shulker boxes (all 17 colors), chests, trapped chests, barrels, hoppers, dispensers, and droppers. Each holds 27 slots except hoppers (5 slots), dispensers (9 slots), and droppers (9 slots).
Add the container component in square brackets after the item id. The syntax is /give @s chest[container=[{slot:0,item:{id:"minecraft:diamond",count:64}}]]. Each entry sets a slot number and the item that goes in it. This generator builds that syntax for you as you click slots.
Minecraft 1.20.5 replaced the old BlockEntityTag NBT format with the container item component. Commands written for 1.20.4 and earlier will not work in 1.20.5 and later. Use the modern container component this generator outputs.
Yes. Each slot entry accepts a components block on the nested item, for example item:{id:"minecraft:diamond_sword",count:1,components:{"minecraft:enchantments":{"minecraft:sharpness":5}}}. This generator writes that for you: click a slot, pick the item, then add enchantments in the slot editor. Enchanted books get stored_enchantments instead so they still work in an anvil.
Browse more Minecraft tools: