Custom Loot Tables - MarkusBordihn/BOs-Easy-Mob-Farm GitHub Wiki
Easy Mob Farm supports fully customizable loot tables for each captured mob.
This allows modpack creators and other mod developers to define specific drops for individual mobs
or even third-party entities like dragons, bosses, or custom NPCs.
These loot tables are automatically loaded and will be used only if the original entityβs loot table
is empty or missing, which is often the case for special or custom mobs such as ender_dragon
,
ice_dragon
, or other modded entities / bosses.
This allows mod developers to define custom drops for their entities without requiring special
integration.
By placing the corresponding loot table at
data/easy_mob_farm/loot_tables/entities/<namespace>/<entity_name>.json
,
the mob will drop the defined items when captured and processed by the Easy Mob Farm system.
The custom Loot tables are stored in the following path within a data pack or resource pack:
data/easy_mob_farm/loot_tables/entities/<namespace>/<entity_name>.json
-
<namespace>
: The namespace of the entity's mod (e.g.minecraft
,iceandfire
) -
<entity_name>
: The entity's registry name (e.g.ender_dragon
,fire_dragon
)
Entity | Resource Location | Path |
---|---|---|
Ender Dragon | easy_mob_farm:entities/minecraft/ender_dragon |
data/easy_mob_farm/loot_tables/entities/minecraft/ender_dragon.json |
Fire Dragon (Ice & Fire) | easy_mob_farm:entities/iceandfire/fire_dragon |
data/easy_mob_farm/loot_tables/entities/iceandfire/fire_dragon.json |
- The mod first attempts to use the vanilla loot table of an entity.
- If the vanilla loot table is empty or does not exist, it looks for a fallback loot table under:
data/easy_mob_farm/loot_tables/entities/<namespace>/<entity_name>.json
- If a custom loot table is found, it is used to generate loot for the mob farm.
- Custom loot tables use standard Minecraft JSON format.
- Any item, including modded items, can be defined in drops.
- Conditions like
random_chance
andset_count
are supported.
The following example shows the custom loot table for the Fire Dragon for the Ice and Fire mod. This loot table will drop dragon bones, dragon flesh, and dragon blood.
{
"type": "minecraft:entity",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "iceandfire:dragonbone"
},
{
"type": "item",
"name": "iceandfire:fire_dragon_flesh",
"conditions": [
{"condition": "minecraft:random_chance", "chance": 0.8}
]
},
{
"type": "item",
"name": "iceandfire:dragonscales_red",
"conditions": [
{"condition": "minecraft:random_chance", "chance": 0.6}
]
},
{
"type": "item",
"name": "iceandfire:fire_dragon_blood",
"conditions": [
{"condition": "minecraft:random_chance", "chance": 0.35}
]
}
]
}
]
}
If your custom loot table does not seem to work, check the following:
- β Make sure the file exists at the correct path inside the datapack or mod resources.
- β
Ensure the JSON syntax is valid and includes at least
"type"
and"pools"
. - β
Check your Minecraft logs (
latest.log
) while running with debug mode enabled.
You may see entries like the following when a custom loot table is loaded:
No loot drops for EntityIceDragon['Ice Dragon'/4859, l='ServerLevel[Enderdragon]', x=0.00, y=0.00, z=0.00] trying custom loot table easy_mob_farm:entities/iceandfire/ice_dragon!
No loot drops for EnderDragon['Ender Dragon'/4790, l='ServerLevel[Enderdragon]', x=0.00, y=0.00, z=0.00] trying custom loot table easy_mob_farm:entities/minecraft/ender_dragon!
These messages indicate that the default loot table was empty, and a **custom one is being used ** instead.
If your file is malformed or refers to missing items, you will see:
Couldn't parse loot table easy_mob_farm:entities/...
Expected name to be an item, was unknown string '...'
Use these logs to verify correct integration and fix issues.
- β No mod integration is required β works via datapacks or resource packs
- β Fully supports modded items and conditions
- β Allows customized drops per mob or mod