# Minecraft loot chest generator

Copy-ready loot container commands for Minecraft Java, and every vanilla loot
table path. Interactive version, with a searchable catalogue and a fixed-seed
option: https://mcmeddon.com/tools/loot-chest-generator

A loot table stored on a container is *unresolved*: it rolls its items the
first time the container is opened. Opening it yourself resolves it into
ordinary items, which is why a container meant for a map or a schematic has to
be copied while still closed.

## The same chest, in every version

A chest that fills from `minecraft:chests/simple_dungeon`, written the way each
version wants it. Item NBT became components in 1.20.5, which is the only break
in this syntax since 1.13.

- 1.20.5 and newer (item components)

  `/give @p minecraft:chest[minecraft:container_loot={loot_table:"minecraft:chests/simple_dungeon"}]`

- 1.13 to 1.20.4 (legacy item NBT)

  `/give @p minecraft:chest{BlockEntityTag:{LootTable:"minecraft:chests/simple_dungeon"}}`

- Place it directly, any version from 1.13

  `/setblock ~ ~1 ~ minecraft:chest{LootTable:"minecraft:chests/simple_dungeon"} replace`

## Actions

Every command below uses the 1.20.5+ syntax and the same example table.

- Give a placeable container item

  `/give @p minecraft:chest[minecraft:container_loot={loot_table:"minecraft:chests/simple_dungeon"}]`

- Place a loot container at a position

  `/setblock ~ ~1 ~ minecraft:chest{LootTable:"minecraft:chests/simple_dungeon"} replace`

- Apply a table to a container already placed

  `/data merge block ~ ~1 ~ {LootTable:"minecraft:chests/simple_dungeon"}`

- Summon a chest minecart

  `/summon minecraft:chest_minecart ~ ~1 ~ {LootTable:"minecraft:chests/simple_dungeon"}`

- Roll the table now into an existing container (inserts real items)

  `/loot insert ~ ~1 ~ loot minecraft:chests/simple_dungeon`

- Fixed roll: the same items every time

  `/setblock ~ ~1 ~ minecraft:chest{LootTable:"minecraft:chests/simple_dungeon",LootTableSeed:123456L} replace`

## Environments

The parser a server reaches for depends on what else is installed.

- Vanilla or single-player

  `/give @p minecraft:chest[minecraft:container_loot={loot_table:"minecraft:chests/simple_dungeon"}]`

- Paper / Spigot with EssentialsX, which registers its own `/give`

  `/minecraft:give @p minecraft:chest[minecraft:container_loot={loot_table:"minecraft:chests/simple_dungeon"}]`

- Server console, function file or command block (no leading slash)

  `minecraft:give @p minecraft:chest[minecraft:container_loot={loot_table:"minecraft:chests/simple_dungeon"}]`

- WorldEdit selection (fills the whole region)

  `//set minecraft:chest{'LootTable':'minecraft:chests/simple_dungeon'}`

- Axiom or a schematic workflow

  `/minecraft:give @p minecraft:chest[minecraft:container_loot={loot_table:"minecraft:chests/simple_dungeon"}]`

## Containers

Any of these takes a `LootTable`. Swap the block ID in the commands above.

- `minecraft:chest` (Chest)
- `minecraft:trapped_chest` (Trapped chest)
- `minecraft:barrel` (Barrel)
- `minecraft:dispenser` (Dispenser)
- `minecraft:dropper` (Dropper)
- `minecraft:hopper` (Hopper)
- `minecraft:shulker_box` (Shulker box)
- `minecraft:decorated_pot` (Decorated pot)
- `minecraft:suspicious_sand` (Suspicious sand)
- `minecraft:suspicious_gravel` (Suspicious gravel)

Suspicious sand and gravel are brushable blocks, not containers, so the give
form has to name the block entity or the item comes out empty:

`/give @p minecraft:suspicious_sand[minecraft:block_entity_data={id:"minecraft:brushable_block",LootTable:"minecraft:archaeology/desert_well"}]`

## Loot tables

All 69 container paths in the vanilla data pack, verified against the
server jars for 1.21.5 through 26.2. Paths tagged with a version are newer than
that baseline and will not resolve on an older server.

### Archaeology

- `minecraft:archaeology/desert_pyramid`
- `minecraft:archaeology/desert_well`
- `minecraft:archaeology/ocean_ruin_cold`
- `minecraft:archaeology/ocean_ruin_warm`
- `minecraft:archaeology/trail_ruins_common`
- `minecraft:archaeology/trail_ruins_rare`

### Abandoned Camp

- `minecraft:barrels/abandoned_camp_barrel` (new in 26.3, use `minecraft:barrel`)
- `minecraft:chests/abandoned_camp_common_chest` (new in 26.3)
- `minecraft:chests/abandoned_camp_secret_chest` (new in 26.3)

### Structure Chests

- `minecraft:chests/abandoned_mineshaft`
- `minecraft:chests/buried_treasure`
- `minecraft:chests/desert_pyramid`
- `minecraft:chests/end_city_treasure`
- `minecraft:chests/igloo_chest`
- `minecraft:chests/jungle_temple`
- `minecraft:chests/jungle_temple_dispenser`
- `minecraft:chests/nether_bridge`
- `minecraft:chests/pillager_outpost`
- `minecraft:chests/ruined_portal`
- `minecraft:chests/simple_dungeon`
- `minecraft:chests/spawn_bonus_chest`
- `minecraft:chests/underwater_ruin_big`
- `minecraft:chests/underwater_ruin_small`
- `minecraft:chests/woodland_mansion`

### Ancient City

- `minecraft:chests/ancient_city`
- `minecraft:chests/ancient_city_ice_box`

### Bastion Remnant

- `minecraft:chests/bastion_bridge`
- `minecraft:chests/bastion_hoglin_stable`
- `minecraft:chests/bastion_other`
- `minecraft:chests/bastion_treasure`

### Shipwreck

- `minecraft:chests/shipwreck_map`
- `minecraft:chests/shipwreck_supply`
- `minecraft:chests/shipwreck_treasure`

### Stronghold

- `minecraft:chests/stronghold_corridor`
- `minecraft:chests/stronghold_crossing`
- `minecraft:chests/stronghold_library`

### Trial Chambers: Chests

- `minecraft:chests/trial_chambers/corridor`
- `minecraft:chests/trial_chambers/entrance`
- `minecraft:chests/trial_chambers/intersection`
- `minecraft:chests/trial_chambers/intersection_barrel`
- `minecraft:chests/trial_chambers/reward`
- `minecraft:chests/trial_chambers/reward_common`
- `minecraft:chests/trial_chambers/reward_ominous`
- `minecraft:chests/trial_chambers/reward_ominous_common`
- `minecraft:chests/trial_chambers/reward_ominous_rare`
- `minecraft:chests/trial_chambers/reward_ominous_unique`
- `minecraft:chests/trial_chambers/reward_rare`
- `minecraft:chests/trial_chambers/reward_unique`
- `minecraft:chests/trial_chambers/supply`

### Village

- `minecraft:chests/village/village_armorer`
- `minecraft:chests/village/village_butcher`
- `minecraft:chests/village/village_cartographer`
- `minecraft:chests/village/village_desert_house`
- `minecraft:chests/village/village_fisher`
- `minecraft:chests/village/village_fletcher`
- `minecraft:chests/village/village_mason`
- `minecraft:chests/village/village_plains_house`
- `minecraft:chests/village/village_savanna_house`
- `minecraft:chests/village/village_shepherd`
- `minecraft:chests/village/village_snowy_house`
- `minecraft:chests/village/village_taiga_house`
- `minecraft:chests/village/village_tannery`
- `minecraft:chests/village/village_temple`
- `minecraft:chests/village/village_toolsmith`
- `minecraft:chests/village/village_weaponsmith`

### Trial Chambers: Dispensers

- `minecraft:dispensers/trial_chambers/chamber`
- `minecraft:dispensers/trial_chambers/corridor`
- `minecraft:dispensers/trial_chambers/water`

### Trial Chambers: Decorated Pots

- `minecraft:pots/trial_chambers/corridor`

## A reliable WorldEdit / Axiom workflow

1. **Choose the matching environment** Use namespaced vanilla commands on plugin servers. For a WorldEdit selection, choose its profile to generate native `//set …{NBT}` syntax.

2. **Copy before opening** Opening the container resolves its table into ordinary `Items`. Use `Ctrl` + middle-click while it is still unopened to copy the unresolved loot data.

3. **Verify the saved asset** Run `/data get block x y z LootTable` after pasting. If it returns the namespaced ID, the schematic or editor preserved the table.

### Why can EssentialsX, WorldEdit, or Axiom appear to break the command?

EssentialsX registers its own `/give` parser, so the Paper/Spigot profile explicitly calls `/minecraft:give`. WorldEdit supports block-entity SNBT but requires `worldedit.setnbt` and a version-compatible adapter. Axiom and schematic exports may serialize the block entity separately. Keep the container unopened and verify its `LootTable` tag after every editor or schematic round-trip.

### Server permissions and command contexts

Namespacing selects the correct vanilla parser; it does not bypass permissions. Paper users need OP or the matching node such as `minecraft.command.give`. WorldEdit users need `worldedit.region.set` and `worldedit.setnbt`. Console, functions, and command blocks omit the leading slash; console placement should use absolute coordinates, and console giving should use an exact online player name.

### Unresolved table vs generated items

`/give`, `/setblock`, `/data merge`, and the minecart command store a table that rolls on first use. `/loot insert` rolls immediately and inserts real items. Use the latter when an editor cannot preserve block-entity loot-table data.

Source: https://mcmeddon.com/tools/loot-chest-generator
