Skip to content

Loot Tables

Loot table files live in plugins/EmakiMobs/loot_tables/*.yml and are linked to mob definitions by mob_id.

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>

pools fields

FieldTypeDescription
rollsintNumber of draws from this pool per mob death.
entriesmapEntry collection; each draw picks one entry by weight.

entries fields

FieldTypeDefaultDescription
itemstringVanilla item as minecraft:<id>. Resolved by vanilla material matching only.
emaki_itemstringEmakiItem item ID. Requires EmakiItem to be installed.
weightint1Draw weight; higher values are selected more often.
chancedouble1.0Extra probability filter applied after selection, 0.0–1.0.
functionsmapModifier 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

yaml
functions:
  count:
    type: set_count
    count:
      min: 2
      max: 5

Drops 2–5 of the item (random).

looting_enchant — looting bonus

yaml
functions:
  looting:
    type: looting_enchant
    count:
      min: 0
      max: 1

Adds 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:

yaml
entries:
  elite_sword:
    emaki_item: "elite_iron_sword"   # EmakiItem item ID, no prefix
    weight: 1
    chance: 0.05                     # 5% chance to drop

Do 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

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