Appendix F — Loot Table Conditions and Functions Reference
A loot table is built from two kinds of building block you will reach for over and over: conditions that decide whether something happens, and functions that decide what the resulting item looks like. This appendix is a flat, scannable list of every condition type and every function type the current Java Edition documents, with a one-line summary of each. Use it as a lookup table once you already understand the ideas; the teaching versions live in Chapter 16 (your first loot table), Chapter 17 (functions and conditions in loot tables), and Chapter 37 (advanced loot tables).
A note on names. In a loot table the JSON key for a condition is "condition" and the key
for a function is "function"; both take a resource location (the minecraft: namespace is
omitted throughout this appendix). Two names changed in modern Minecraft and you will still
see the old ones in older tutorials: the looting-drop function is now
enchanted_count_increase (it was once called looting_enchant), and the NBT-copying
function is now copy_custom_data (it was once called copy_nbt). The names in this
appendix are the current ones the game actually accepts.
Conditions
In a loot table, conditions are predicates: the same “if this, then that” checks used in
predicate files, target selectors, and execute if predicate. A pool, an entry, or a whole
table can carry a conditions list; every predicate in that list must pass. The condition
types below are every value the predicate condition field accepts.
| Condition type | What it checks |
|---|---|
all_of | Passes if all of a list of sub-predicates pass. Invokable from any context. |
any_of | Passes if any one of a list of sub-predicates passes. Invokable from any context. |
block_state_property | Checks the mined block and its block states. Requires a block state from loot context; fails if not provided. |
damage_source_properties | Checks properties of the damage source. Requires an origin and a damage source from loot context; fails if not provided. |
enchantment_active_check | Checks whether an enchantment is currently active. Requires enchantment-active status from loot context; usable only from the enchanted_location context. |
entity_properties | Checks properties of an entity (uses the same predicate structure as advancements). Invokable from any context. |
entity_scores | Checks an entity’s scoreboard scores; all listed scores must pass. Requires the specified entity from loot context; fails if not provided. |
inverted | Inverts (negates) another condition. Invokable from any context. |
killed_by_player | Passes if an attacking_player entity is provided by loot context; fails if not provided. |
location_check | Checks the current location (with optional X/Y/Z offsets) against location criteria. Requires an origin from loot context; fails if not provided. |
match_tool | Checks the tool used to mine the block (same item-predicate structure as advancements). Requires a tool from loot context; fails if not provided. |
random_chance | Generates a random number 0.0–1.0 and passes if it is below the given chance. Invokable from any context. |
random_chance_with_enchanted_bonus | Like random_chance, but the success rate scales with the level of a given enchantment on the attacker. Treats a missing enchantment as level 0. |
reference | Invokes a separate predicate file and returns its result. Invokable from any context; cannot be used in enchantment definitions. |
survives_explosion | Passes with probability 1 ÷ explosion radius. Requires an explosion radius from loot context; always passes if not provided. |
table_bonus | Passes with a probability picked from a list indexed by enchantment power. Requires a tool from loot context; treats a missing tool as level 0. |
time_check | Compares the current day time against a value or range, with an optional period modulo. Invokable from any context. |
value_check | Compares a number (from a number provider) against another number or range. Invokable from any context. |
weather_check | Checks the current weather (raining and/or thundering). Invokable from any context. |
19 condition types.
Functions
Functions (also called item functions or loot functions) modify the item stacks a
table produces: changing the count, adding components, enchanting, copying data, and so on.
A function carries a function field naming its type, an optional conditions list, and its
own type-specific parameters. The same function types are what an item modifier file
contains, so this list doubles as the item-modifier reference. The types below are every value
the function field accepts.
| Function type | What it does |
|---|---|
apply_bonus | Applies a predefined bonus formula (binomial_with_bonus_count, uniform_bonus_count, or ore_drops) to the stack count, based on an enchantment level. |
copy_components | Copies components from a loot-context source (block entity, attacker, tool, etc.) onto the item, with optional include/exclude lists. |
copy_custom_data | Copies NBT from an entity, block entity, or command storage into the item’s custom_data component. (Modern name; replaces legacy copy_nbt.) |
copy_name | Copies an entity or block entity’s name tag into the item’s custom_name component. |
copy_state | Copies block-state properties from loot context into the item’s block_state component. |
discard | Removes the item stack. |
enchant_randomly | Enchants the item with one randomly chosen enchantment (a book becomes an enchanted book). |
enchant_with_levels | Enchants the item at a specified enchantment level, like an enchanting table at that level (a book becomes an enchanted book). |
enchanted_count_increase | Adjusts the stack size based on an enchantment level on the killer entity. (Modern name; replaces legacy looting_enchant.) |
exploration_map | Converts an empty map into an explorer map pointing at a nearby generated structure. Requires an origin from loot context. |
explosion_decay | Removes some items from the stack when an explosion radius is provided (each item has a 1/radius chance to be lost). |
fill_player_head | Adds the required tags to make a player head for a player from loot context. |
filtered | Applies an item predicate, then runs on_pass/on_fail modifiers depending on the result. |
furnace_smelt | Smelts the item as a furnace would, without changing its count. |
limit_count | Clamps the count of every item stack to an exact limit or a min/max range. |
modify_contents | Applies a function to every item inside an inventory component (bundle_contents, charged_projectiles, or container). |
reference | Calls a separate item-modifier file (sub-functions) by name. |
sequence | Applies a list of functions in order; does not check conditions (all listed functions always run). |
set_attributes | Adds attribute modifiers to the item. |
set_banner_pattern | Adds or replaces a banner’s patterns. |
set_book_cover | Sets the cover details (author, generation, title) of the written_book_content component. |
set_components | Sets (or, with a ! prefix, removes) data components on the item. |
set_contents | Fills a container-style component with item stacks from a list of loot entries. |
set_count | Sets the stack size (absolute, or relative with add). |
set_custom_data | Sets the item’s custom_data component by merging in supplied NBT. |
set_custom_model_data | Sets the custom_model_data component (floats, flags, strings, and colors). |
set_damage | Sets the item’s damage/durability fraction (absolute, or relative with add). |
set_enchantments | Modifies the item’s enchantments by level (a book becomes an enchanted book). |
set_fireworks | Sets the fireworks component (explosions and flight duration). |
set_firework_explosion | Sets the firework_explosion component (shape, colors, trail, twinkle). |
set_instrument | Sets the instrument tags to a random value from an instrument tag. |
set_item | Replaces the item type without changing count or components. |
set_loot_table | Sets the loot table (and optional seed) a placed container block will use when opened. |
set_lore | Adds or changes the item’s lore lines, with append/insert/replace modes. |
set_name | Sets the item’s custom_name (or item_name) to a JSON text component. |
set_ominous_bottle_amplifier | Sets the ominous_bottle_amplifier component from a number provider. |
set_potion | Sets the potion_contents component to a given potion ID. |
set_random_dyes | Sets the dyed_color component by selecting random dyes. |
set_random_potion | Sets the potion_contents component to a randomly chosen potion. |
set_stew_effect | Sets the status effects of a suspicious stew (fails on any other item). |
set_writable_book_pages | Manipulates the pages of the writable_book_content component. |
set_written_book_pages | Manipulates the pages of the written_book_content component. |
toggle_tooltips | Toggles which item tooltips are visible (attribute modifiers, enchantments, trim, etc.). |
43 function types.
See also
- Chapter 16 — your first loot table: pools, rolls, entries, and weight.
- Chapter 17 — using functions and conditions inside a loot table.
- Chapter 37 — advanced loot tables: composite entries, item modifiers, loot context, and reuse via
reference. - Chapter 18 — predicate condition reference (the same condition types, in their predicate-file role).
Scope: current Java Edition. Every type and description above comes from Java Edition’s Item modifier and Predicate definitions, the same ones the Loot table format uses. If a type you expect is missing here, check the wiki’s Item modifier and Predicate pages for the latest additions.