Mineuniverse
Log in Register
Mods

Modify Drops API

Allows for more complex and context-sensitive item drops
by TigerOfTroy
Download Claim this project
38,660 downloads
0 likes
Updated Jul 6, 2026
0 hypes
API and Library

Modify Drops API

 

Modify Drops API allows for more complex and context-sensitive item drops. It is an API created for use in Chest Cavity and Hellish Materials, but is valuable to anyone who wants to have greater control over the output of loot tables.

 

How it Works


Whenever loot is generated from a loot table (even if the result is no drops), Modify Drops API will call the following events in order: GenerateLootCallbackAddLoot, GenerateLootCallbackModifyLoot, and GenerateLootCallbackAddUnmodifiableLoot.

 

GenerateLootCallbackAddLoot listeners accept the loot table's LootContextType and LootContext, and return a List<Itemstack>. Anything in the returned list is added to the existing list of drops. GenerateEntity and GenerateBlockLootCallbackAddLoot are called if the LootContextType is ENTITY or BLOCK, and so can be used when adding drops to those loot events instead of checking the LootContextType yourself.

 

GenerateLootCallbackModifyLoot listerners accept the loot table's LootContextType, LootContext, and the List<Itemstack> of drops. They return a List<Itemstack> which will replace the old loot. ModifyLoot, like AddLoot, calls Entity and Block sub-events for ease of use.

 

GenerateLootCallbackAddUnmodifiableLoot functions identically to AddLoot, but is called after ModifyLoot and so is for drops that you do not want other listeners to interact with.

 

Importing Modify Drops API

 

To use Modify Drops API in your mod, add the following line to your dependencies in build.gradle:

modApi "com.github.tigereye504:modify-drops-api:x.x.x"

Optionally, you can embed Modify Drops API as a jar-in-jar by also including the following in your dependencies:

include "com.github.tigereye504:modify-drops-api:x.x.x"

where x.x.x is the version of the API you wish to use.

modify-drops-api-0.3.1.jar
MC 1.16.3, 1.16.1, Fabric, 1.16.4, 1.16.2
Release 2020-11-18 Get

More from TigerOfTroy

Chest Cavity: Special Organs
9,811
Transite [Fabric]
968
BattleCards
89
Chest Cavity [Fabric]
793,598
Spellbound Enchantments [Fabric]
574,133
Passive Charms
3,570

You Might Also Like

Vivecraft
A Minecraft VR mod on a loader of your choice!
9,988,339
Athena
A crossplatform (Forge/Fabric) solution to connected block textures for 1.19.4+
99,799,527
Lodestone
A collection of code used throughout projects under the Lodestar team.
9,914,417
TheDragonLib
A library for most of sokratis12GR's Mods
9,910,232
Multi Mob Library
A library mod containing essential files for Daveyx0's mob mods
9,892,767
FTB Library (Forge) (Legacy)
FTB Library is a library mod that is used for some of our mods.
98,265,314