English
Loot Tables
loot_tables/*.yml loot tables define what a mob drops when it is killed. Loot table files live in plugins/EmakiMobs/loot_tables/*.yml and are linked to mob definitions by mob_id. The loot table released on first start is loot_tables/example_zombie.yml, whose structure matches the full example below
A same-named file applies on its own
Drop handling reads loot_tables/<mob_id>.yml for a mob id directly, whether or not the definition writes a loot_table component. Once it applies, every vanilla drop is cleared first and replaced by the pools in this file (kill experience is still kept via experience). The loot_table component only sets the vanilla/datapack loot table — see the "Loot fields" section of Components
File structure
yaml
mob_id: <mob id> # must exactly match the mob definition's id field
pools:
<pool name>:
rolls: <int> # how many times to draw from this pool per death
entries:
<entry name>:
item: "<vanilla item id>" # either this or emaki_item
# emaki_item: "<EmakiItem item ID>"
weight: <int>
chance: <double> # optional: probability filter
functions: # optional: modifier functions
count:
type: set_count
count:
min: <int>
max: <int>
looting:
type: looting_enchant
count:
min: <int>
max: <int>Top-level and pools fields
| Field | Type | Required | Default | Accepted values | Description |
|---|---|---|---|---|---|
mob_id | string | Yes | none | a loaded mob definition id (case-sensitive) | The linked mob; a blank or missing value records an issue and discards the file |
pools | section | No | empty | — | Pool collection; the keys are arbitrary labels and take no part in drop calculation. When omitted the table drops nothing |
pools.<pool name> | section | No | empty | — | A single pool; entries that are not mappings (a bare string, for example) are skipped |
pools.<pool name>.rolls | int or numeric string | No | 1 | ≥ 1 (anything below 1 is treated as 1) | Draws from this pool per mob death; a value that does not parse as an integer logs a finest-level entry and is treated as 1 |
pools.<pool name>.entries | section | No | empty | — | Entry collection; each draw picks one entry from this pool by weight |
pools.<pool name>.entries.<entry name> | section | No | empty | — | A single entry; non-mapping entries are skipped |
entries fields
| Field | Type | Required | Default | Accepted values | Description |
|---|---|---|---|---|---|
item | string | No | none | a vanilla material name (case-insensitive, optional namespace) | Resolved by vanilla material matching only; when matching fails the entry drops nothing |
emaki_item | string | No | none | an EmakiItem item ID (no prefix) | Requires EmakiItem to be installed and that id defined in its items/ directory. When EmakiItem is absent the entry is skipped and emaki_item drops disabled is logged once |
weight | int | No | 1 | — | Draw weight; higher values are selected more often. Entries with a weight ≤ 0 never enter the pool (no error) |
chance | double | No | 1.0 | 0.0–1.0 | Extra probability filter applied after selection: 0.5 means a 50% chance to actually drop; ≥ 1.0 always passes |
functions | section | No | empty | — | Modifier function collection; the keys are arbitrary labels |
At least one of item and emaki_item is required; the whole entry is skipped when both are missing or blank. When both are present, emaki_item wins (falling back to item only when EmakiItem is unavailable or cannot resolve the id)
functions fields
| Field | Type | Required | Default | Accepted values | Description |
|---|---|---|---|---|---|
type | string | Yes | none | set_count / looting_enchant | Function type; a missing value skips the function and any other value is silently ignored |
count.min | int | No | 1 | — | Lower bound of the count range. Used by set_count; looting_enchant ignores it |
count.max | int | No | 1 | — | Upper bound of the count range. set_count picks randomly within [min, max]; looting_enchant uses max × looting level |
When the count sub-section is missing, both bounds fall back to 1
set_count — set drop quantity
yaml
functions:
count:
type: set_count
count:
min: 2
max: 5Drops 2–5 of the item (random, inclusive); when max ≤ min the value is fixed to min. The final amount is capped at the item's maximum stack size
looting_enchant — looting bonus
yaml
functions:
looting:
type: looting_enchant
count:
min: 0
max: 1With Looting level L on the killer's main-hand weapon (L = 0 does nothing), adds a random 0 … count.max × L extra items. looting_enchant only uses count.max
EmakiItem integration
Dropping an EmakiItem uses the separate emaki_item key, whose value is the bare item ID:
yaml
entries:
elite_sword:
emaki_item: "elite_iron_sword" # EmakiItem item ID, no prefix
weight: 1
chance: 0.05 # 5% chance to dropDo not put EmakiItem items under the item key
item is resolved by vanilla material matching only. emakiitem:elite_iron_sword matches no vanilla material, so the entry silently drops nothing. EmakiItem items must go under the emaki_item key
Full example
yaml
mob_id: elite_zombie
pools:
main:
rolls: 1
entries:
rotten_flesh:
item: "minecraft:rotten_flesh"
weight: 10
functions:
count:
type: set_count
count:
min: 2
max: 5
looting:
type: looting_enchant
count:
min: 0
max: 1
iron_nugget:
item: "minecraft:iron_nugget"
weight: 4
functions:
count:
type: set_count
count:
min: 2
max: 4
rare:
rolls: 1
entries:
iron_sword:
item: "minecraft:iron_sword"
weight: 1
chance: 0.15