DropRate - Custom Mob Drops & API

Version 1.0.2 | GNU General Public License v3.0

Overview

DropRate is a Minecraft Forge mod that provides:

Installation

For Players

1. Download droprate-1.0.2.jar
2. Place in /mods folder
3. Configure /config/droprate.config.json

For Developers

Add to build.gradle:

repositories {
    maven {
        url "https://cursemaven.com"
        content { includeGroup "curse.maven" }
    }
}

dependencies {
    implementation fg.deobf("curse.maven:drop-rate-api-1208468:6249868")
}

JSON Configuration

File: /config/droprate.config.json

Basic Example

{
  "config": [
    {
      "mob": "minecraft:zombie",
      "rate": 80,
      "item": ["minecraft:apple"],
      "item_amount": {
        "min_amount": 1,
        "max_amount": 3
      }
    }
  ]
}

Field Reference

FieldTypeDescription
mobStringEntity ID (format: modid:entity)
rateIntegerDrop chance percentage (0-100)
itemString[]List of item IDs to drop
item_amountInteger/ObjectFixed amount or {min_amount, max_amount} range

Developer API

Core Methods

// Register drops
DropRateAPI.registerDrop(
    EntityType.ZOMBIE,
    75,
    Arrays.asList(Items.DIAMOND, Items.EMERALD),
    1,
    3
);

// Query existing drops
List<DropData> drops = DropRateAPI.getDropData(EntityType.SKELETON);

// Remove specific drops
DropRateAPI.removeDrop(EntityType.CREEPER, Items.GUNPOWDER);

Event Integration

@SubscribeEvent
public void onMobDeath(LivingDeathEvent event) {
    // Access DropRate data
    List<DropData> drops = DropRateAPI.getDropData(event.getEntity().getType());
    
    // Custom drop logic here
}

Compatibility

Note: When using with other loot-modifying mods, load order matters. DropRate should load after core content mods but before other loot modifiers.

ModCompatibilityNotes
ApotheosisFullUse Apotheosis for drop scaling
LootrPartialTest chest interactions
TConstructLimitedNo tool modification support

License

DropRate - Custom Mob Drops & API
Copyright (C) 2023 TamKungZ_

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.