Community listing page, reviews may not be monitored by the author.
Fishing Loot Helper API
No reviews yet
This API makes it easy for mods to add custom fishing loot.
Community voices
Reviews
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
About
Project Details
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.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
Resources
External Links
About
Description
Fishing Loot Helper API
This API makes it easy for mods to add custom fishing loot.
Right now there are just versions for 26.3, for Fabric and NeoForge.
Installation
1. Add the API .jar
Place the fishingloothelperapi.jar file into your Minecraft mods folder:
C:\Users\you\AppData\Roaming\.minecraft\mods
Also, place a copy inside your mod's libs folder:
your-mod/
├── libs/
│ └── fishingloothelperapi.jar
├── src/
├── build.gradle
└── ...
2. Add the API to build.gradle
Change version 1.0.0 to whatever version you are using.
repositories {
flatDir {
dir 'libs'
}
}
dependencies {
implementation 'com.exline:fishingloothelperapi:1.0.0'
}
3. Add the API as a mod dependency
In neoforge.mods.toml, add:
[[dependencies.${mod_id}]]
modId="fishingloothelperapi"
type="required"
versionRange="[1.0.0,)"
ordering="NONE"
side="BOTH"
For Fabric:
Open src/main/resources/fabric.mod.json and add fishingloothelperapi to the existing depends section:
"depends": {
"fabricloader": ">=0.19.0",
"minecraft": "26.3",
"fishingloothelperapi": ">=1.0.0"
}
Use the API version you are depending on.
The API .jar must also be present in the Minecraft mods folder when running the game.
Adding Fishing Loot
Register custom fishing loot with this method:
FishRegistry.registerFishingLoot(
Items.BRAIN_CORAL,
10,
FishingEntry.FishingType.FISH
);
Parameters
Item (Required)
The item being added to the fishing loot can be a vanilla item or custom item.
Items.BRAIN_CORAL
Weight (Required)
The item's weight. Higher weight means a higher chance of being selected.
10
Fishing Loot Type (Optional)
This determines which vanilla fishing pool the item is added to.
FishingEntry.FishingType.FISH
Available types:
FishingEntry.FishingType.FISH
FishingEntry.FishingType.JUNK
FishingEntry.FishingType.TREASURE
Example with a modded item
FishRegistry.registerFishingLoot(
ModItems.ANCHOVY,
10,
FishingEntry.FishingType.FISH
);
Biomes
You can optionally choose which biome(s) an item can be caught in.
One Biome
FishRegistry.registerFishingLoot(
ModItems.ANCHOVY,
10,
FishingEntry.FishingType.FISH,
Biomes.OCEAN
);
Multiple Biomes
FishRegistry.registerFishingLoot(
ModItems.ANCHOVY,
10,
FishingEntry.FishingType.FISH,
Biomes.OCEAN,
Biomes.BEACH
);
Biome Tags
You can also use biome tags instead of individual biome keys.
Multiple biome tags can be specified as well.
FishRegistry.registerFishingLoot(
ModItems.ANCHOVY,
10,
FishingEntry.FishingType.FISH,
Tags.Biomes.IS_AQUATIC
);
Any Biome
When no biomes are specified, the item can be caught in any biome.
The same applies to junk and treasure:
FishRegistry.registerFishingLoot(
ModItems.ANCHOVY,
10,
FishingEntry.FishingType.FISH
);
Weights
Fishing Loot Helper API uses a weight system based on the vanilla fishing pool.
Vanilla Base Weights
| Fishing Type | Base Weight |
|---|---|
| Fish | 100 |
| Junk | 110 |
| Treasure | 6 |
Your custom loot is added to the corresponding vanilla pool.
From our earlier example, we have a weight of 10:
FishRegistry.registerFishingLoot(
ModItems.ANCHOVY,
10,
FishingEntry.FishingType.FISH
);
The fish pool becomes:
| Loot | Weight |
|---|---|
| Vanilla fish | 100 |
| Anchovy | 10 |
| Total | 110 |
The Anchovy therefore has a 10/110 chance of being selected, or about 9.09%.
If you add two fish with weight 10:
| Loot | Weight |
|---|---|
| Vanilla fish | 100 |
| Fish A | 10 |
| Fish B | 10 |
| Total | 120 |
Each custom fish has a 10/120 chance of being selected, or about 8.33%.
Base Weight + Added Weights = New Total Weight
Higher weight = more common loot.
More weight added means less chance of getting vanilla loot.
However, you can also add the same vanilla loot to increase the chances again, like cod or salmon.
Vanilla Weights for Reference
Fish
| Item | Weight |
|---|---|
| Cod | 60 |
| Salmon | 25 |
| Pufferfish | 13 |
| Tropical Fish | 2 |
| Total | 100 |
Junk
| Item | Weight |
|---|---|
| Lily Pad | 17 |
| Leather Boots | 10 |
| Leather | 10 |
| Water Potion | 10 |
| String | 5 |
| Fishing Rod | 2 |
| Bowl | 5 |
| Stick | 5 |
| Ink Sac | 5 |
| Tripwire Hook | 5 |
| Rotten Flesh | 5 |
| Bamboo | 5 |
| Total | 110 |
Treasure
| Item | Weight |
|---|---|
| Bow | 1 |
| Enchanted Book | 1 |
| Fishing Rod | 1 |
| Name Tag | 1 |
| Nautilus Shell | 1 |
| Saddle | 1 |
| Total | 6 |
You can calculate an item's chance by dividing its weight by the total weight.
For example, if we add a fish with weight 20, the chance of catching Cod goes from 60/100, or 60%, to 60/120, or 50%.
Example Mod
I made an example mod you can use to learn from or just try out. https://github.com/jexline/ogfishmod
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
By the numbers
Statistics
Get it on
Available Platforms
On ModDex
Community snapshot
By the numbers
Statistics
Resources