Bedrock Wiki
  • Discord
  • Contribute
  • bedrock.dev
  • MS Learn
Beginner's Guide
  • Guide
    • 1. Introduction
      guide
    • 2. Add-Ons Explained
    • 3. Software & Preparation
    • 4. Project Setup
    • 5. Create a Custom Item
    • 6. Create a Custom Entity
    • 7. Blockbench: Modeling, Texturing & Animating
    • 8. Adding a Loot Table, Spawn Rule & Crafting Recipe
  • Extra
    • a. Understanding JSON
    • b. Download Example Packs
    • c. Troubleshooting
      help
    • d. Advanced Manifest
    • e. Format Versions
    • f. Project Setup Android
Animation Controllers
  • Intro to Animation Controllers
    guide
  • Entity Commands
  • AFK Detector
  • Death Commands
  • Molang into Scoreboard
  • Respawn Commands
Blocks
  • General
    • Intro to Blocks
      guide
    • Block Components
    • Block Tags
    • Block States
    • Block Traits
    • Block Permutations
    • Block Events
      Scripts
    • Block Event Migration
      help
    • Blocks as Items
    • Troubleshooting Blocks
      help
  • Visuals
    • Block Culling
    • Block Models
      guide
    • Block Texture Animation
    • Block Texture Variation
    • Block Tinting
  • Tutorials
    • Applying Constant Effects
      Scripts
    • Avoiding State Limit
    • Fake Blocks
    • Ore Loot Tables
      Scripts
    • Precise Interaction
      Scripts
    • Precise Rotation
      Scripts
    • Rotatable Blocks
  • Vanilla Re-Creations
    • Custom Crops
      Scripts
    • Custom Glass
    • Custom Glazed Terracotta
    • Custom Trapdoors
      Scripts
  • Documentation
    • Block Format History
    • Block Shapes
    • Block Sounds
    • Vanilla Block Models
Commands
  • General
    • Intro to Command Blocks
    • Functions
    • Block States
    • Coordinate System
    • NBT Commands
    • Scoreboard Operations
    • Understanding Selectors
  • Commands
    • Damage
    • Execute
    • Playanimation
    • Playsound
  • On Event Systems
    • On Player First Join
    • On Player Join
    • On Player Leave
    • On Player Death
    • On Player Respawn
    • On First World Load
  • Scoreboard Systems
    • Entity Counter
    • Scoreboard Timers
    • Comparing And Retrieving Scores
  • Techniques
    • Execute Logic Gates
    • MBE - Max's Block Entity
    • FMBE - A New Way to Create Display Entities
    • Look Detection
    • Movement Detections
    • Orbital Camera
  • Useful Creations
    • Custom Crafter
    • Multiplayer Position Rearrangement
      function
Concepts
  • contents.json
  • Emojis & Symbols
  • Molang
  • Namespaces
  • Overwriting Assets
  • Raw Text
  • Shaders
  • Sounds
  • Subpacks
  • Text and Localization
  • Texture Atlases
  • textures_list.json
Documentation
  • Shared Constructs
  • Advanced Molang
  • File Types
  • Fog IDs
  • Material Configuration Description
  • Menu Categories
  • Molang Queries
  • Pack Folder Structure
  • Sound Definitions
  • Vanilla Materials
Entities
  • General
    • Intro to Entities BP
      guide
    • Intro to Entities RP
      guide
    • Troubleshooting Entities
      help
    • Entity Events
    • Entity Properties
    • NPC Dialogues
    • Render Controllers
    • Spawn Rules
  • Tutorials
    • Convert Points Between Any Space (World, Entity, Bones)
    • Creating Boats
    • Detecting Other Entities
    • Disabling Team Damage
    • Dummy Entities
    • Entity Attacks
    • Entity Holds Item
    • Entity Movement
    • Entity Timers
    • Flying Entities
    • Introduction to AOE Clouds
    • Invulnerable Entities
    • Look at Entity
    • Sleeping Entities
    • Solid Entities
    • Spawning Tamed Entities
      Scripts
    • Village Mechanic
  • Documentation
    • Dummy Components
    • Non-Mob Runtime Identifiers
    • Projectiles
    • Runtime Identifiers
    • Vanilla Usage Components
    • Vanilla Usage Spawn Rules
Items
  • General
    • Intro to Items
      guide
    • Item Components
    • Item Tags
    • Item Events
      Scripts
    • Item Event Migration
      help
    • Troubleshooting Items
      help
  • Tutorials
    • Custom Armor
    • Custom Food
      Scripts
    • Custom Pottery Sherds
    • Custom Weapons
    • Equipment-Based Commands
    • High Resolution Items
    • Spawning Items
    • Throwable Items
  • Documentation
    • Enchantments
    • Attachables
    • Item Format History
    • Numerical Item IDs
    • Vanilla Item Identifiers
    • Vanilla Usage Components
JSON UI
  • General
    • Intro to JSON UI
      guide
    • Best Practices
      guide
  • Tutorials
    • Adding HUD Elements
    • Aseprite Animations
    • Buttons and Toggles
    • Modifying Server Forms
    • Preserve Title Texts
    • String to Number
  • Documentation
    • JSON UI Documentation
Loot, Recipes & Trading
  • General
    • Trading Behavior
  • Documentation
    • Loot Tables
    • Trade Tables
    • Recipes
    • Item Functions
  • Tutorials
    • Randomized Structure Loot
Meta
  • Add-On Performance
  • Style Guide
  • Useful Links
  • Using Schemas
  • Version Control
  • Q&A
    • Blocks and Items Q&A 2024/08/30
    • Deferred Technical Preview Q&A 2024/02/23
    • GameTest Q&A 2021/08/06
    • Scripting and Editor Q&A 2023/09/22
    • World Generation Q&A 2024/11/15
NBT
  • General
    • .mcstructure
  • Tutorials
    • Experiments in Education Edition
    • Extending Structure Limits
  • NBT in Depth
    • About NBT (Named Binary Tag)
    • NBT Libraries
    • Reading NBT Example
Particles
  • General
    • Intro to Particles
      guide
  • Tutorials
    • Disabling Particles
  • Documentation
    • Vanilla Particles
Scripting
  • General
    • Intro to Scripting
    • What is Script API?
    • API Modules
  • Tutorials
    • Block Placement Prevention
    • GameTests
    • Script Core Features
    • Script Forms
    • Script Requests API
    • Simple Chat Commands
  • Documentation
    • Engine Environment
    • Script Resources
    • Script Watchdog
    • Troubleshooting JavaScript
    • TypeScript
Servers
  • Software
    • Bedrock Server Software
  • Protocols
    • Bedrock Protocol
    • NetherNet Protocol
    • RakNet Protocol
Visuals
  • General
    • Introduction to Entity Visuals
      guide
    • Bedrock Modeling
    • Custom Death Animations
    • Effects in Animations
    • Material Creations
    • Materials
    • Math-Based Animations
    • Skin Packs
  • Tutorials
    • Entity Texture Animation
    • Glowing Entity Texture
    • Hurt Animations
    • Leash Position
    • Player Geometry
    • Remove Entity Shadows
    • Retexturing Spawn Eggs
  • Ideas
    • Structure Presentation
World Generation
  • General
    • Intro to World Generation
      guide
    • Biomes
      guide
    • Feature Types
  • Tutorials
    • Block Conditions for Features
    • Generating Custom Ores
    • Generating Custom Structures
    • Generating Patches
    • Heightmap Noise
  • Documentation
    • Biome Tags

Loot Tables

Loot Tables
  • Integration
  • Structure
    • Pools
    • Entries
    • Functions
    • Conditions
  • Overrides

WARNING

This document is a work in progress.

Loot tables are used to select a set of items from a declared collection. Loot tables can be used from:

  • The /loot command
  • Container contents
  • Block drops
  • Fishing
  • Mob drops
  • Equipment on spawned mobs
  • Other various mob actions

A different collection of items may be chosen each instance the same loot table would be used, based on external conditions, and innate randomness. Such variation is crucial for playability and adventuring, especially in more RPG-driven systems.

Integration ​

Loot tables are not registered add-on entries and are instead referenced by path from the above sources. Loot tables may be placed anywhere within a behavior pack, but it's recommended to place them under the top-level loot_tables directory, following vanilla convention.

        • πŸ“cypress_door.json

Structure ​

Loot tables are represented as JSON objects with a single required "pools" array property.

#
json
{
	"pools": [
		…
	]
}
1
2
3
4
5

The loot returned from a loot table invocation will be the collective sum of the yields of all pools provided here.

Pools ​

Pools act as isolated constructs for selecting items; the results of pools cannot be influenced by other pools.

#
json
{
	"rolls": 1,
	
	"entries": [
		{
			"type": "item",
			"name": "wiki:silver"
		}
	]
}
1
2
3
4
5
6
7
8
9
10

Two types of pools are available: general-purpose weighted random pools and tiered pools, the latter of which is traditionally used for selecting mob equipment.

Weighted Random Pools ​

A traditional weighted random pool selects items based on relative weight, choosing a number of yields based on a configured roll count.

artifacts.json/pools/0
json
{
	"rolls": {
		"min": 2,
		"max": 4
	},
	
	"entries": [
		{
			"type": "item",
			"name": "minecraft:golden_apple",
			"weight": 20
		},
		{
			"type": "item",
			"name": "minecraft:appleEnchanted",
			"weight": 1
		},
		{
			"type": "item",
			"name": "minecraft:name_tag",
			"weight": 30
		}
	]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Rolls ​
Bonus Rolls ​

The roll count for a weighted random pool may be altered based on the player's luck using the optional "bonus_rolls" property.

json
"bonus_rolls": 3,
"bonus_chance": 0.095
1
2
Entry Weighting ​

The weight is the chance of this entry being chosen. The higher the weight in comparison to other entries in this "entries" array, the higher the chance of the entry being chosen.

json
"weight": 3
1
Quality ​

The weight of an entry can be changed based on the player's luck using the quality property.

json
"quality": 2
1

Currently, luck is only expressed when fishing with a fishing rod enchanted with Luck of the Sea.

Tiered Pools ​

Tiered pools are used to select exactly one entry from a collection.

json
{
	"tiers": {
		"initial_range": 2,
		
		"bonus_rolls": 3,
		"bonus_chance": 0.095
	},

	"entries": [
		{
			"type": "loot_table",
			"name": "loot_tables/entities/armor_set_leather.json"
		},
		{
			"type": "loot_table",
			"name": "loot_tables/entities/armor_set_gold.json"
		},
		{
			"type": "loot_table",
			"name": "loot_tables/entities/armor_set_chain.json"
		},
		{
			"type": "loot_table",
			"name": "loot_tables/entities/armor_set_iron.json"
		},
		{
			"type": "loot_table",
			"name": "loot_tables/entities/armor_set_diamond.json"
		}
	]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

A pool becomes tiered with the inclusion of the "tiers" object property:

json
"tiers": {
	"initial_range": 2,
	
	"bonus_rolls": 3,
	"bonus_chance": 0.095
}
1
2
3
4
5
6

Entries in a tiered pool are ordered. The selected entry for a tiered pool is based on its index. To determine this index, a starting index is randomly rolled and then a batch of success rolls attempt to increment this starting index.

The starting index is decided by rolling a random integer between 1 and the integer property "initial_range". If no initial range is provided, it defaults to 1, forcing a starting index of 1.

Next, attempts are made to advanced the index using additional rolls. The count of these roll attempts is given as an integer to "bonus_rolls". The chance that any such roll succeeds is given via "bonus_chance". Chances for "bonus_chance" are out of 1, meaning 0.5 would be a 50% chance for any bonus roll to succeed. Each successful roll increases the index by 1. Both of these properties default to 0, meaning both must be provided to use this additional rolls mechanic.

The final determined index is used to select the corresponding entry as that pool's yield. Indices in tiered pools are one-indexed, meaning the first entry has an index of 1, the second has an index of 2, and so forth. If the determined index is larger than the entry count for that pool, no yield will be provided.

WARNING

All conditions on entries in a tiered pool are ignored. Conditions on the pool itself are still allowed.

Entries ​

Entries are the selectable units of a pool. Three different types of entries are available.

Item Entries ​

Item entries are the fundamental entry type for selecting loot. Item entries refer to

json
"type": "item",
"name": "minecraft:apple",
"weight": 1
1
2
3

Loot Table Entries ​

Loot hierarchies can be formed using loot table entries.

json
"type": "loot_table",
"name": "loot_tables/custom/example.json"
"weight": 1
1
2
3

Empty Entries ​

When selected, empty entries won't yield any loot for that roll.

json
"type": "empty",
"weight": 4
1
2

Empty entries can generally be mimicked using a roll count whose range includes 0, random chance conditions, or count functions that could randomly select 0. Their primary advantage is readability when using weighted random pools: denoting by weight when a roll won't yield an entry may be easier to understand.

Functions ​

Functions are what makes loot tables so powerful. They can do a wide range of tasks for each entry in your loot table. For example, they can change the amount of an item is dropped, what enchantments are present (even on items that normally cannot be enchanted), the item name, it's lore, and it can even write books! View item functions for a full list of functions and how they're used.

artifacts.json/pools/entries
json
{
	"type": "item",
	"name": "minecraft:dirt",
	"weight": 10,
	"functions": [
		{
			"function": "set_count",
			"count": {
				"min": 16,
				"max": 64
			}
		},
		{
			"function": "set_name",
			"name": "Pile of dirt"
		}
	]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

Conditions ​

Conditions check to see if a certain criteria is met. Examples: "Was Zombie killed by Player", "Did the sword have the Looting enchantment on it? If so, what level?"

artifacts.json/pools/entries
json
{
	"conditions": [
		{
			"condition": "killed_by_player"
		},
		{
			"condition": "random_chance_with_looting",
			"chance": 0.025,
			"looting_multiplier": 0.01
		}
	],
	"rolls": 1,
	"entries": [
		{
			"type": "item",
			"name": "minecraft:iron_ingot",
			"weight": 1
		},
		{
			"type": "item",
			"name": "minecraft:carrot",
			"weight": 1
		},
		{
			"type": "item",
			"name": "minecraft:potato",
			"weight": 1
		}
	]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

Overrides ​

Contributors

Edit Loot Tables on GitHub

Bedrock Wiki by Bedrock OSS

"Minecraft" is a trademark of Mojang AB.

Bedrock OSS, Bedrock Wiki and bedrock.dev are not affiliated in any way with Microsoft or Mojang AB.

  • Privacy Policy
  • Join our Discord
  • Learn how to Contribute
  • Visit our Repository