โ›๏ธ Episode 5 ยท Improver ยท Loot

Decide What Drops
Episode 5: Loot Tables

A loot table decides what an action produces: what a block drops, what is in a chest, or what a mob leaves behind. Learn to write your own.

๐Ÿ‘ถ Ages 10+ โฑ๏ธ ~50 mins โ›๏ธ Minecraft โœ“ Free workshop
๐ŸŽ Loot table ๐ŸŽฒ Pools & rolls โš–๏ธ Chance ๐Ÿ”— Attach it
โญ
0 XP
Level 1
๐Ÿ”ฅ0
Your Progress 0 / 4 steps
Build it in our Datapack Studio too: lay out the crafting recipe, write your function and pack files, then export a real datapack zip in the browser with no install. Open the Minecraft Mod Studio →
๐Ÿ”ฅ
Ember says: loot tables are where you add a little luck to your pack. A rare drop feels amazing when you got the odds right.
1
๐ŸŽ
The Loot File
Where loot lives
Active
๐ŸŽฏ
Goal for this step

Create a loot table file.

  • 1Loot tables go in data/<namespace>/loot_table/ (loot_tables in older versions).
  • 2The file describes pools of entries.
  • 3Each pool can roll a number of times.
โœ๏ธ
Fill in the Blanks
+15 XP
Loot tables go in data/<namespace>//.
๐Ÿง 
Knowledge Check
+15 XP
What is a loot table?
AA rule for what an action drops
BA type of block
CA music track
2
๐ŸŽฒ
Pools and Rolls
Draw the prize
Locked
๐ŸŽฏ
Goal for this step

Write a simple pool.

  • 1pools is a list. Each pool has rolls and entries.
  • 2rolls is how many times it draws from the entries.
  • 3An entry can be an item, and can have a weight to make it rare.
{
  "type": "minecraft:block",
  "pools": [{
    "rolls": 1,
    "entries": [
      { "type": "minecraft:item", "name": "minecraft:diamond", "weight": 1 },
      { "type": "minecraft:item", "name": "minecraft:coal", "weight": 5 }
    ]
  }]
}
โœ๏ธ
Fill in the Blanks
+15 XP
To make an item rarer, give it a smaller .
๐Ÿง 
Knowledge Check
+15 XP
Which item is rarer in the example?
AThe diamond (weight 1)
BThe coal (weight 5)
CThey are equal
3
โš–๏ธ
Chance and Count
Tune the odds
Locked
๐ŸŽฏ
Goal for this step

Understand chance and stacking.

  • 1A lower weight means a lower chance.
  • 2You can give a drop a range of counts, like 1 to 3.
  • 3Test by breaking the block many times and counting the drops.
โœ๏ธ
Fill in the Blanks
+15 XP
A lower weight means a chance.
๐Ÿง 
Knowledge Check
+15 XP
How do you test a loot table?
ADo the action many times and count the drops
BRead it once
CGuess
4
๐Ÿ”—
Attach It
Make it happen
Locked
๐ŸŽฏ
Goal for this step

Point something at your loot table.

  • 1A block or mob points at a loot table by its id, like mypack:blocks/treasure.
  • 2For chests, set the loot table in the chest NBT or with a function.
  • 3Reload and test in-game.
โœ๏ธ
Fill in the Blanks
+15 XP
A thing points at a loot table by its .
๐Ÿง 
Knowledge Check
+15 XP
What is the main job of a loot table?
ADecide what drops when something happens
BChange the sky colour
CRename blocks
๐ŸŽ‰โœจ๐Ÿ†๐ŸŽ‰
Your Own Drops!
You can control loot. Next you use tags to group items and let recipes work with whole families of blocks.
0
Total XP
1
Level
0
Best Streak
0%
Accuracy
Next: Episode 6: Tags and Advancements โ†’