Mod

Modify Drops API

Quick rating

Modify Drops API

No reviews yet

Allows for more complex and context-sensitive item drops

Mod Loaders
Fabric
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

About

Project Details

Type
Mod
Latest Version
modify-drops-api-0.3.1.jar
Authors

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

CurseForge ID

Resources

External Links

Source Issues Wiki Discord

About

Description

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.

Screenshots

Gallery

This project has no gallery images yet.

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

~38,000
Downloads
Last Updated
Created
Last synced
When ModDex last fetched and imported data for this project from CurseForge or Modrinth. High-traffic and active projects are checked more often.
Next pipeline sync