External LootTables
By TheDiamondBlue1
Release:
Updated: 11/17/25
Version: 2.0.0
About It
What Is It?
Welcome to External LootTables! This script/addon allows you to add drops to mobs loot tables without directly editing them. It allows you to dynamically add loot via script, offering extensive customisation with both vanilla and custom conditions and functions.
This flexibility makes it easy to tailor loot tables to fit your needs, whether you're working with vanilla or custom entities.
This is V2 of ELT, which was rebuilt to handler invalid info, which prevents the loot from failing to drop.
How It Works
Welcome to our addon! Inside, you'll find 3 folders and 2 files under scripts: def, table, utilities, config.js, index.js, each serving a specific purpose. The Def folder holds TypeScript Definitions for autocompletion. The Table folder holds the files to let you make custom loot tables and lets you add custom families to group drops together. The Utilities folder is where the Functions and Conditions are. The config.js file is the configuration file, it literary just has the DEBUG config for debugging. The index.js file is where the magic happens as that file holds the main controls.
This is also important, the structure of the custom loot tables follows similar, if not the same, structure as the vanilla JSON loot tables. If you don't know the structure or how it works, please read Introduction to Loot Tables first then come back.
What's Next?
Below, you will find some examples and the conditions & functions and how to use them to help build your own loot table
Loot Types
There are 3 different loot types: Empty, Item, Loot table.
Empty just drops nothing. That is it, nothing special.
Items lets you drop any item that can be customised with functions.
Loot table lets you use a JSON Loot table as a drop, just make one and you can plug it in here it will drop it
Examples
There is also to ways to do loot tables, by Mob Name or Family Name.
Mob Name: Uses the mobs identifier to drop the set loot for that mob only.
Family Name: Uses the family name to drop the set loot for a group of mobs.
Mob Name
Family Name
Functions
There are 8 types of functions:
"set_count", "set_name", "set_lore", "looting_enchant", "apply_enchantment", "enchant_randomly", "set_book_contents", & "set_damage"
Set Count
This type lets you set a count, either a set amount or a random range amount.
type - The function type.
count - The count amount. Can be number or object with a min and max value.
Set Name
This type lets you set a custom name.
type - The function type.
name - The custom name. Uses a string/RawMessage.
Set Lore
This type lets you set a custom lore.
type - The function type.
lore[] - The custom lore. Uses string/RawMessage Array.
Looting Enchant
This type lets you set a count that gets added to the initial amount.
type - The function type.
count - The count amount. Can be number or object with a min and max value.
Apply Enchantment
This type lets you set an enchantment
type - The function type.
enchant - Can be string, object, or an array.
enchant {string} - Enchantment name
enchant {object} - Uses id for enchantment and level for the power
enchant {array} - Makes an array with the object
Enchant Randomly
This type lets you set a random enchantment, it will only work if the name of the tool is in it.
type - The function type.
Set Book Contents
This type lets you set an enchantment
type - The function type.
author - This is the name of the author. It uses a string. If omit, will be set to "Unknown".
title - This is the name of the book. It uses a string. If omit, will be set to "Untitled".
pages [] - This is the contents of the book. It uses RawMessages/strings.
Set Damage
This type lets you set an enchantment
type - The function type.
damage - The damage amount. Can be number or object with a min and max value.
Damage is like this: 1.0 = 100%, 0.5 = 50%, 0.0 = 0% Durability.
Conditions
Conditions can be in pools and/or entries. There are 10 types of conditions:
"killed_by_player", "killed_by_player_or_pets", "random_chance", "random_chance_with_looting", "time_check", "has_mark_variant", "has_variant", "random_difficulty_chance", "death_cause", & "biome_check"
Killed By Player
This type test if the entity died by a player.
type - The condition type.
Killed By Player or Pets
This type test if the entity died by a player or their pets.
type - The condition type.
Random Chance
This type uses chance.
type - The condition type.
chance - The chance of it to pass. Uses number. 1.0 = 100% & 0.0 = 0%. If omit, it will be 0%
Random Chance With Looting
This type uses chance multiplied by the multiplier times the loot level
type - The condition type.
chance - The chance of it to pass. Uses number. 1.0 = 100% & 0.0 = 0%. If omit, it will be 0%
lootingMultiplier - The chance is multiplied by this times the looting level. Uses number
Time Check
This type test if the entity died between the 2 defined time
type - The condition type.
timeRange - The 2 time to test, using Min & Max. Uses numbers and/or TimeOfDay Enum
Has Mark Variant
This type test if the entity has the marked variant. An example of this are the marked variants for which suspicious stew you might get from a mooshroom.
type - The condition type.
markVariant - The mark variant of the entity. Uses a number
Has Variant
This type test if the entity has the marked variant. An example of this is when a frog kills a magma cube and drops either a verdant, ochre, or pearlescent froglight.
type - The condition type.
variant - The variant of the entity. Uses a number
Random Difficulty Chance
This type uses chance. That chance can change based on your difficulty
type - The condition type.
default - The default chance if the difficulty is not defined. Works the same as random chance.
peaceful | easy | normal | hard - The chance for that difficulty. Not all needs to be on, you can have some or even just 1
Death Cause
This type uses chance. That chance can change based on your difficulty
type - The condition type.
default - The default chance if the difficulty is not defined. Works the same as random chance.
peaceful | easy | normal | hard - The chance for that difficulty. Not all needs to be on, you can have some or even just 1
Biome Check
This type test if the entity died in this biome.
type - The condition type.
biome- The biome that is being checked. Uses strings
