A Minecraft Forge mod for managing custom mob drops with JSON configuration and API integration.
/droprate_reload
commandAdd to your build.gradle
:
repositories { maven { url "https://cursemaven.com" } } dependencies { implementation fg.deobf("curse.maven:droprateapi-1208468:6249868") }View CurseMaven Guide
Create config/droprate.config.json
:
{ "config": [ { "mob": "minecraft:zombie", "rate": 80, "item": ["minecraft:apple"], "item_amount": { "min_amount": 1, "max_amount": 3 } } ] }
Field | Description |
---|---|
mob | Entity ID (e.g., "minecraft:skeleton") |
rate | Drop chance (1-100) |
item | Array of item IDs |
item_amount | Number (fixed) or {min_amount, max_amount} |
Note: Amounts are clamped between 1-64 automatically
/droprate_reload
- Reload config without restarting
import th.tamkungz.droprateapi.api.DropRateAPI;
import net.minecraft.entity.EntityType; import net.minecraft.item.Items; import java.util.Arrays; import java.util.List;
DropRateAPI.registerDrop( EntityType.ZOMBIE, // Mob type 75, // 75% drop chance Arrays.asList(Items.DIAMOND, Items.EMERALD), // Items 1, // Min amount 5 // Max amount );
// Remove all diamond drops from zombies DropRateAPI.removeDrop(EntityType.ZOMBIE, Items.DIAMOND);
{ "mob": "minecraft:creeper", "rate": 100, "item": ["minecraft:gunpowder", "minecraft:tnt"], "item_amount": 2 }
{ "mob": "minecraft:enderman", "rate": 40, "item": ["minecraft:ender_pearl"], "item_amount": { "min_amount": 2, "max_amount": 5 } }
Drops are processed in MobDeathHandler
during the LivingDeathEvent
. Each drop entry is evaluated independently.