Loot Tables
Loot table files live in plugins/EmakiMobs/loot_tables/*.yml and are linked to mob definitions by mob_id.
File structure
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>pools fields
| Field | Type | Description |
|---|---|---|
rolls | int | Number of draws from this pool per mob death. |
entries | map | Entry collection; each draw picks one entry by weight. |
entries fields
| Field | Type | Default | Description |
|---|---|---|---|
item | string | — | Vanilla item as minecraft:<id>. Resolved by vanilla material matching only. |
emaki_item | string | — | EmakiItem item ID. Requires EmakiItem to be installed. |
weight | int | 1 | Draw weight; higher values are selected more often. |
chance | double | 1.0 | Extra probability filter applied after selection, 0.0–1.0. |
functions | map | — | Modifier functions applied to the selected entry. |
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.
functions
set_count — set drop quantity
functions:
count:
type: set_count
count:
min: 2
max: 5Drops 2–5 of the item (random).
looting_enchant — looting bonus
functions:
looting:
type: looting_enchant
count:
min: 0
max: 1Adds 0–1 extra item per Looting enchantment level on the killer's weapon.
EmakiItem integration
Dropping an EmakiItem uses the separate emaki_item key, whose value is the bare item ID:
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.
NOTE
Requires EmakiItem to be installed and elite_iron_sword defined in EmakiItem's items/ directory. When EmakiItem is absent, emaki_item entries are skipped and emaki_item drops disabled is logged once.
Full example
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