Minecraft Developer Docs
DropRateAPI
Configure custom mob drops with JSON and integrate drop rules from Forge mods.
Overview
DropRateAPI adds a JSON-driven way to define extra mob drops and exposes a small API for other mods to register or remove drop rules at runtime.
- Configure drops per mob entity ID.
- Use percentage-based drop chances from 0 to 100.
- Support fixed or ranged item amounts.
- Reload configuration without restarting the game or server.
Installation
1
Download
Download the DropRateAPI jar for your Minecraft and Forge version.
2
Install
Place the jar in the mods folder.
3
Launch
Start the game or server once to generate config/droprate.config.json.
repositories {
maven {
url "https://cursemaven.com"
content { includeGroup "curse.maven" }
}
}
dependencies {
implementation fg.deobf("curse.maven:drop-rate-api-1208468:6249868")
}Configuration
The main configuration file is config/droprate.config.json.
{
"config": [
{
"mob": "minecraft:zombie",
"rate": 80,
"item": ["minecraft:apple"],
"item_amount": {
"min_amount": 1,
"max_amount": 3
}
}
]
}| Field | Type | Description |
|---|---|---|
| mob | String | Entity ID such as minecraft:zombie. |
| rate | Integer | Drop chance percentage from 0 to 100. |
| item | Array | Item IDs to drop. |
| item_amount | Number or Object | Fixed amount or min_amount/max_amount range. Amounts are clamped from 1 to 64. |
Commands
| Command | Description |
|---|---|
| /droprate_reload | Reloads config/droprate.config.json without restarting. |
Developer API
import th.tamkungz.droprateapi.api.DropRateAPI;
import net.minecraft.entity.EntityType;
import net.minecraft.item.Items;
import java.util.Arrays;
DropRateAPI.registerDrop(
EntityType.ZOMBIE,
75,
Arrays.asList(Items.DIAMOND, Items.EMERALD),
1,
5
);
DropRateAPI.removeDrop(EntityType.CREEPER, Items.GUNPOWDER);Compatibility
Load order
Load DropRateAPI after core content mods when possible, and before heavy loot modifiers when you need its rules to win.
License
Check the project source or release page for the current license terms.