Loot tables and trade tables
A loot table is JSON that picks some items from a declared collection of items, and a trade table is JSON that holds the trades of an entity. Neither is registered on its own. They are referenced by path from elsewhere (entities, blocks, /loot, structure chests). The evidence is the loot docs of the Bedrock Wiki (0930b39), MS Learn (a9fd1c0), loot_tables/ and trading/ of bedrock-samples (15701fa9), and community research.
1. Loot tables
Structure
A loot table is JSON that requires one pools array. The result of a call is the sum of the results of all pools. Pools are independent of each other and are not affected by the results of other pools. They can go anywhere in the BP, but placing them under the top-level loot_tables/ like vanilla is recommended (Source: bedrock-wiki).
They are used by the /loot command, container contents, block drops, fishing, mob drops, equipment of spawned mobs and other mob behavior.
A weighted random pool example. rolls is a number or {min,max}, and bonus_rolls/bonus_chance can change the count with the player's luck. The larger an entry's weight, the more likely it is picked, and quality changes the weight with luck (currently only the Luck of the Sea fishing rod).
{
"pools": [
{
"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 }
]
}
]
}
Tier pools
A pool with a tiers object picks exactly one entry (mostly for mob equipment). Entries are ordered and counted from 1. The starting index is a random integer between 1 and initial_range (default 1), and bonus_rolls attempts each raise the index by 1 with probability bonus_chance. The entry at the final index is the result. In a tier pool all entry conditions are ignored and only conditions on the pool itself are allowed.
{
"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_iron.json" }
]
}
Entries, functions, conditions
- Entry types are
item(an item ID),loot_table(a reference to another loot table, for building hierarchies) andempty(gives nothing on that roll).emptycan also be imitated by including 0 in the roll range or with a probability condition, but it reads better in weighted pools. - The 27.0.20 preview adds a
minecraft:alternativesentry (format_version1.27.0). It tries itschildrenin order and uses only the first child whose conditions pass (if/else). Example:{"type":"minecraft:alternatives","children":[{"type":"minecraft:item","name":"minecraft:diamond","conditions":[{"condition":"killed_by_player_or_pets"}]},{"type":"minecraft:item","name":"minecraft:stick"}]}gives a diamond when a player or pet killed the mob and a stick otherwise. - Functions attach to entries and change count, name, enchantments and so on.
{ "type": "item", "name": "minecraft:dirt", "weight": 10,
"functions": [
{ "function": "set_count", "count": { "min": 16, "max": 64 } },
{ "function": "set_name", "name": "Pile of dirt" }
] }
Commonly used functions are set_count, set_name, set_lore, set_data, enchant_with_levels, enchant_randomly, looting_enchant, furnace_smelt and exploration_map (the destination of a map trade, for example village_taiga).
- Conditions attach to pools or entries.
{
"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 } ]
}
The match_tool condition gives item tags to minecraft:match_tool_filter_all/any/none. Without "count": 1 an empty hand matches too.
Use on entities and blocks (community reports)
- Entity loot needs
rollsandentriesin every pool. Minimal form:{"pools":[{"rolls":1,"entries":[{"type":"item","name":"ns:item","weight":1,"functions":[{"function":"set_count","count":{"min":1,"max":1}}]}]}]}. There is a report that there were still no drops (not resolved). For entities, specify it withminecraft:loot. For baby variants, ifminecraft:ageableis present the baby loot table may not apply, so put the loot component inside the group. - A block specifies it with
"minecraft:loot": "loot_tables/...". With a custom table the block does not drop itself unless you list it explicitly. Silk Touch and Fortune are hardcoded, so handle them with scripts. Ore XP is produced by spawningminecraft:xp_orbfrom a script. Vanilla block drops cannot be changed except for the data-driven vanilla blocks of 26.50. The detailed rules are in the loot table section of Blocks. - Structure chest loot is put in with NBT editing, the jigsaw processor (
append_loot) and random loot tools. A world-saved structure with the same name takes priority over the BP one, so run/structure delete <name>and load again. - The count of a dropped item cannot be changed, so despawn it and spawn it again with the new count. For an adventure mode pickaxe, give an ItemStack that has the Can Destroy property.
- To equip gear, use
/loot replace entity @s slot.armor.chest 0 loot "equipment/trial_chamber_diamond".
2. Trade tables
A trade table is JSON with no version and no namespace, placed in BP/trading/. It is referenced from an entity component (minecraft:trade_table). To avoid clashes, use a namespace folder under trading/. Unlike loot tables it does not support Molang and uses range objects and functions. Even one missing comma breaks the whole file (Failed to load trade table).
The structure is tiers[] containing groups[] that contain trades[], or tiers[] containing trades[] directly. A tier is unlocked by total_exp_required. A trade has wants (required items: item, quantity, price_multiplier, a choice list) and gives (offered items, functions allowed), max_uses, reward_exp and trader_exp. The num_to_select of a group is the number of trades to pick from the group (Source: bedrock-wiki, trade-tables).
{
"tiers": [
{
"groups": [
{
"num_to_select": 1,
"trades": [
{
"wants": [
{ "item": "wiki:blessing_glyph", "quantity": { "min": 2, "max": 4 }, "price_multiplier": 0.5 },
{ "item": "minecraft:book" }
],
"gives": [
{ "item": "minecraft:enchanted_book",
"functions": [ { "function": "enchant_book_for_trading",
"base_cost": 4, "base_random_cost": 12, "per_level_cost": 4, "per_level_random_cost": 8 } ] }
],
"max_uses": 7,
"trader_exp": 3
}
]
}
]
},
{
"total_exp_required": 28,
"trades": [
{ "wants": [ { "choice": [
{ "item": "wiki:sacred_stones", "quantity": { "min": 4, "max": 6 }, "price_multiplier": 0.5 },
{ "item": "wiki:blessed_beads", "quantity": { "min": 16, "max": 24 }, "price_multiplier": 0.5 } ] } ],
"gives": [ { "item": "wiki:aeleon_jewels", "quantity": { "min": 4, "max": 6 } } ],
"max_uses": 2 }
]
}
]
}
- There is no native way to make a custom villager profession block. Use
move_to_block+ an event that changes the profession group, and store block positions with scripts. To refresh the trade table you must despawn and respawn.minecraft:dwellermakes villagers claim beds and workstations. Trades beyond vanilla enchantment levels are impossible, so fake enchantments are made with scripts. The detailed entity-side rules are in section 5 of Entities.
3. Additional rules (merged from community research packs-versions)
Loot table basics
- To call another loot table, write the full path including
.jsonin thenameof an entry with"type": "loot_table"("loot_tables/chests/abandoned_mineshaft.json"). Custom tables go inBP/loot_tables/<folder>/<name>.json, and entity loot goes inloot_tables/entities/. - Entry
weightis relative. With 30, 20 and 1, the probability of the first entry is 30/51. An explanation is in the MS Learn introduction to loot tables. - A block dropping itself needs no loot table. Chest loot is seed-based. Banner pattern functions are in Bedrock Wiki item-functions.
random_chanceis a ratio from 0 to 1 (0.01= 1%,5.0is always). Pools are rolled independently, so a guaranteed drop pool does not block a rare pool. To always drop, put that item alone in a separate pool. There is a single report that theminecraft:random_chancefilter was always true in tests. A condition name with aminecraft:prefix is an unknown condition that is dropped without an error and always drops (section 5){measured}.- Fortune emulation (nested pools): there is no
apply_bonus, andalternativesexists only from the 27.0.20 preview (section 1). Any entry can have its ownpools(with conditions) nested without limit, and they fire only when the parent entry dropped. Coal Fortune 3 (1 item 40%, 2~4 items 20% each) is built as 1 + 0.6 chance of (1 + 0.667 chance of (1 + 0.5 chance of 1)). - Functions:
set_enchants/specific_enchants,enchant_with_levels(treasure),set_data(goat horn), setting book text, lang reference%key,carry_over_block_entity_data(26.40 experimental). The vanilla trial vault tables use the functionset_ominous_bottle_amplifier(the name is notset_ominous_bottle){code, measured}. The loot condition list was extracted from vanilla files and is not all in the MS docs. - Exploration maps: a
loot_tableentry points toloot_tables/maps/<name>.json. Jigsaw structures can be located (they also show in/locate), and structure_template_feature structures may not.decorationdecides the map icon.destination,decorationandsearch_radiusofexploration_mapare supported, butzoomhas no effect, so a trade cannot set the map zoom level. - Putting loot into a chest with
/lootfills it consecutively. Vanilla-like scattering is done by NBT editing or a loot processor list. - Script custom drops are not visible to the
lootcommand andLootTableManager(they see onlyminecraft:loot). Make custom drops from scripts withdimension.runCommand('loot spawn ...')or the loot API. A loot table cannot summon mobs (one case handled an item named<typeId> <amount> <nameTag>with aminecraft:itementitySpawnlistener). For a husk to drop sand without a zombie, use a husk-onlyminecraft:loottable.
match_tool and tool conditions
- Form:
{"condition":"match_tool","minecraft:match_tool_filter_all":["minecraft:is_pickaxe"],"minecraft:match_tool_filter_any":["minecraft:diamond_tier","minecraft:netherite_tier"]}. Exclusion isminecraft:match_tool_filter_none, and adding"count": 1makes a bare hand fail. Anenchantment: silk_touchform also exists. The pool entryminecraft:airtrick does not work. - The
filter_all/_anytag combination passing even for a bare hand was a confirmed bug and was fixed in Preview 26.30.27 (related to MCPE-188723). There is also a 2025-12 report that "match all" was broken. Item count 0 gives loot for every tool outside the list but does not consider a bare hand, so vanilla-like leaf loot (sapling/stick chance, Fortune) cannot be reproduced exactly. In 26.30 the ore match_tool drops changed.{community confirmed} match_toolchecks the tool passed to the loot command, so runningloot spawn ... loot "table"without a tool cannot satisfy it.- Custom item tags are defined in the item's
minecraft:tags(for examplewypnt:enderium_tier) and used in loot/recipes. The digger's destroy_speeds use block tags (q.any_tag('minecraft:is_pickaxe_item_destructible')). You cannot properly require a pickaxe tier for an ore (no drop on explosion). To remove a block drop, use an empty loot table such asloot_tables/blocks/air.json.
Overriding vanilla loot
- Generally impossible (obsidian drops and so on). Use scripts. Exceptions where same-path overriding worked: desert temple suspicious sand (2026-05-31), suspicious sand/gravel loot, and wandering trader trades
trading/economy_trades/wandering_trader_trades.json(2026-04-17). Vanilla blocks that became data-driven in 26.50 can have their loot overridden. To make iron ore drop another item instead of raw ore, use block loot replacement (low/negative priority) or script block breaking, and for command replacement use hasitem/clear/give (avoid selecting item entities byname=since it depends on the game language). - Suspicious sand/gravel placed by a player has no loot. Place them with the jigsaw
block_entity_modifierprocessor. - There is a report that entity/chest loot does not work in 26.10 (no resolution)
{single report}. Loot tables do not work inside brarchive (probably the same for vanilla).
Trade tables
- When several villagers share the same trades use a table, and for a single villager use NBT. A trade table can be swapped with a component group (how stock resets is unclear, and per-tag prices are unclear too). One JSON error (a missing comma) fails the whole table.
- It is reported that among script events the villager trade event is not provided by default and needs a separate implementation (scripting research: trade detection is not in the event list).
4. Full reference
The full list of functions and conditions and the full trade table documents are included as MS Learn original excerpts in the loot table reference and the trade table reference. These excerpt pages keep the original text, so the next section holds the corrections and additions.
5. Client code and measurements (Windows 1.26.65.1)
This is the result of reading the client code (the loot function registry, the condition parser, the recipe and trade parsers) and, on the same build, repeating /loot spawn on custom loot tables and summing the counts or reading the Content Log at load (2026-11-23). Function addresses are in native-notes/. Where the code and the measurement disagree, the measurement is written. Things read only at the parser level, such as the defaults of the trade parser, are marked so.
26 functions and 20 conditions
- The client registers 26 loot functions:
set_count,set_data,random_aux_value,set_damage,looting_enchant,enchant_with_levels,enchant_book_for_trading,enchant_randomly,furnace_smelt,set_data_from_color_index,enchant_random_gear,random_block_state,random_dye,exploration_map,set_banner_details,explosion_decay,set_name,set_lore,specific_enchants,fill_container,set_actor_id,set_book_contents,set_stew_effect,set_ominous_bottle_amplifier,set_armor_trim,set_potion. A separate table holds one more,carry_over_block_entity_data. The reference'strader_material_typeis not in this registry and appears only in the trade table conversion code{code}. - The reference's
set_nbtlogsUnsupported looting function: set_nbtat load and is not in the code either{measured, code}.set_enchantsis not in the code either and the name isspecific_enchants(anenchantsarray or a single entry withidandlevel){code}. - There are 20 registered loot conditions:
killed_by_player,killed_by_player_or_pets,killed_by_entity,damaged_by_entity,passenger_of_entity,entity_killed,random_chance,random_difficulty_chance,random_chance_with_looting,random_regional_difficulty_chance,has_mark_variant,has_variant,match_tool,is_baby,has_property,bool_property,int_property,float_property,enum_property,biome_has_tag. 9 are not introduced in the reference{code}.
| Condition | Members read |
|---|---|
damaged_by_entity, passenger_of_entity | entity_type |
is_baby | none |
biome_has_tag | tag (used by a vanilla chest table) |
has_property | domain (an entity property name) |
bool_property, int_property, float_property, enum_property | domain, value |
Which entity's value a property condition looks at was not read. The reference's entity_properties condition has no name in the code {code}.
Condition operator and unknown names
- Every condition takes an
operator."=="and"equals"(default) leave it as is, and"!="and"not"invert the condition."!="onrandom_chance0.0 dropped in all 20 runs and"!="on 1.0 gave 0 items."=="and"equals"gave 0 items and"not"gave 20. Any other value ("xx") logsInvalid loot condition operator "xx". Expected "==", "equals", "!=", or "not".and the condition is dropped, so it always dropped{measured}. The vanillaabandoned_camp_common_chest.jsonuses"operator": "!="onbiome_has_tag{code}. - An unknown condition name (
minecraft:random_chance,re8_nonexistent) always dropped without a log line, as if the condition were absent. Since a typo is not reported, copy condition names from the list without a prefix{measured}. - An unknown function name logs
Unsupported looting function: set_countxand only that function is dropped (count 1). A function name is cut at the:, sofoo:set_countworked asset_count(count 5 over 10 runs gave 50){measured}. - A decimal
countinset_countgave 1 in all 100 runs for 1.5, and{min: 0.5, max: 2.5}summed to 101 over 100 runs. It looks like truncation, but only the distribution was seen and individual values were not checked{measured}.
Individual functions
random_aux_valuehas the same implementation asset_data. Its members aredata(fixed) orvalues(random from a{min, max}range), and with neither the log getsInvalid json keyname for specifying the data range for set_data function. Only 'data' and 'values' are supported..data: 5on a potion gave the same potion in all 5 items andvalues: {min: 1, max: 20}mixed 8 kinds.set_datawithdata: 5was the same{measured, code}. This differs from the reference's explanation that it is similar torandom_block_state.set_stew_effectacceptseffectsas a single object or an array (no log line). It reads onlyid(integer) of an entry and does not readduration{code}. The effect content was not checked.amplifierofset_ominous_bottle_amplifierwas accepted without a log line both as a number and as{min, max}. The amplifier value was not read{measured}.- Only
carry_over_block_entity_datais behind the experiment gate. In a world withupcoming_creator_featuresoff,Unsupported looting function outside of Upcoming Creator Features Experiment: carry_over_block_entity_datawas logged, only the function was dropped, and the item dropped normally{measured}. The other 26 are independent of the experiment{code}. enchant_book_for_tradingreads, besidesbase_cost(default 2),per_level_cost(3),base_random_cost(5) andper_level_random_cost(10), an arrayenchantments: [{name, min, max}]. It is a member the reference lacks and it was not measured in the game{code}.exploration_mapreads only thedestinationstring in the code. The report above thatdecorationandsearch_radiusare supported was not found in the code. Whether they are read elsewhere is unknown{code}.
Recipes
- There are 8 recipe kinds:
recipe_shaped,recipe_shapeless,recipe_furnace,recipe_brewing_mix,recipe_brewing_container,recipe_material_reduction,recipe_smithing_transform,recipe_smithing_trim.recipe_material_reduction(input,output[]) is described in Recipes. - When two furnace recipes have the same
inputand differentoutput, the one read later was dropped withSkipping duplicate furnace recipe.. Changingpriorityto 5 and 1, 1 and 9, and 9 and 1 gave the same result, so the one read first in file name order won.priorityhad no effect on resolving duplicates{measured}.
Trade tables
- A trade without
max_useswas blocked after 7 trades (red X). The reference default of 12 does not match this build and the parser default is 7{measured, code}. - A trade without the item
price_multiplierkept the same price after 7 trades. This differs from the reference default of 0.05 and goes the same way as the parser default of 0. The effect of a given value was not measured{measured, code}. - The trade
weight(integer, 1 or more, default 1) has no effect when there is nogroupsornum_to_selectis -1. At load the warning"weight" key used for a trade without using "groups" key or with "num_to_select" set to -1. Weight value will have no effect as every trade will be chosen.appeared and both trades were shown. Anum_to_selectof -1 selects every trade of the group. Anum_to_selectgreater than the number of trades in the group is an error{measured, code}. - A trade item reads
filters(a filter group) andfunctions(the same parser as the loot function parser). The vanillacartographer_trades.jsonandfisherman_trades.jsonusefilters(in_overworld,is_mark_variant). This was not measured in the game{code}.
| id | Source | License | Commit | Accessed |
|---|---|---|---|---|
private-research | Private research (-) | - | 2026-11-13 | |
bedrock-wiki | Bedrock Wiki | CC BY 4.0 (docs/licenses/CC-BY-4.0.md in the repository) | 0930b39 | 2026-11-13 |
ms-learn | Minecraft Creator documentation (Microsoft Learn) | CC BY 4.0 (documentation), MIT (code) | a9fd1c0 | 2026-11-13 |
bedrock-samples | Mojang bedrock-samples | Minecraft EULA applies, (c) Mojang AB. All rights reserved | 15701fa9 (guide baseline 46ba6ea) | 2026-11-13 |