Minecraft Loot Table Generator

A loot table decides what comes out of a chest, a mob or a fishing rod. It is a JSON file inside a data pack, not a command you can type, so this builder gives you the file and tells you where it goes. Set up pools, weights and count ranges here instead of hand-writing number providers.

Need somewhere to put the result? The data pack generator builds the folder this file belongs in.

Start from a preset

Table

The table type tells Minecraft what context it is rolled in. A chest table cannot use mob-only conditions, which is a common reason a table looks right and never fires.

Pools

Each pool rolls independently. Within a pool, weight decides the odds — a weight of 10 against a weight of 1 means ten times as likely, not ten percent.

Generated JSON

Save as

How to use the generator

Set up a table, add pools and entries, and the JSON and its path update as you type. The presets show three common shapes.

Start from a preset

Dungeon chest rolls two to four times over iron, gold and a rare diamond. Rare mob drop gives a named sword 15% of the time. Fishing catch is mostly cod with a rare name tag.

Table type

Chest, entity, block, fishing, gift or generic tells Minecraft in which situation the table is rolled. A condition that only makes sense for a mob kill never passes in a chest table.

Namespace and file name

Together they give the path, data/<namespace>/loot_table/<file>.json, and the ID commands use, such as harbor:harbor_dungeon.

Pools and rolls

Each pool rolls on its own. Rolls from 2 to 4 means two, three or four picks from that pool, chosen at random each time the table is used.

Entries

Every entry has an item, a weight, a count range and optionally a custom name and a drop chance; the generator turns them into set_count, set_name and a random_chance condition.

Reading the odds

Weight is relative

Weights 10, 5 and 1 in one pool mean 10/16, 5/16 and 1/16 per pick: about 62%, 31% and 6%. Adding an entry lowers the odds of all the others.

Drop chance comes first

An entry with a drop chance is tested before the weighted pick. If the test fails, the entry is out for that pick and the others share the odds; on a pool with one entry it simply means "this often".

Hooking the table up

Test it with /loot give @s loot harbor:harbor_dungeon. To use it, put it on a container, for example /setblock ~ ~1 ~ minecraft:chest{LootTable:"harbor:harbor_dungeon"}, or on a mob through its DeathLootTable.

Versions

The generator writes the 1.21+ folder loot_table; before 1.21 the folder was loot_tables, so rename it there. Count ranges use the explicit minecraft:uniform form, which every version since 1.17 reads.