Let There Be Portal Farms!

Quick rating

Let There Be Portal Farms!

No reviews yet

A Fabric mod for preventing mob despawning when they change dimensions or enter a portal. Fixing portal-based farms. [portal mob despawn farm fix]

Mod Loaders
Fabric
Minecraft
26.2

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

Compatibility

Supported Environments

Dev Environment
Client Unsupported
Server Required

About

Project Details

Type
Mod
License
MIT License
Latest Version
1.0.0
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

Modrinth ID

Resources

External Links

About

Description

Let There Be Portal Farms!

A Fabric server-side mod for Minecraft 26.2+ for solving a common farming inconvenience - mobs despawning upon entering a nether portal, if no other players are nearby.

Installation

This mod requires Fabric API!

Drop the mod .jar into your mods folder, and start the server!

Why is this needed?

In vanilla Minecraft, if both a mob and a player exist in a world, and they're at least 128 blocks apart, then that mob despawns. This a completely normal and vanilla feature, but here is where it gets annoying:

Say a despawnable mob enters a nether portal, and there is a player in the target dimension, nowhere close to that mob? The mob immediately despawns.

This is what breaks most portal-based farms on multiplayer servers, making others rely on having a player AFK at the portal on the other side.

What does this mod do?

LTBPF makes select mobs get a period of despawn immunity once they change dimensions.

If a whitelisted entity enters a portal, it gets a grace period in which they cannot despawn.

And once the period passes, their default despawning logic takes over - making them despawnable again.

It also does not touch entities or mobs which were already persistent by some means (tamed, name tagged, etc.), and checks if they were name tagged while in the grace period, to avoid taking away their persistence.

Configuration

On first run, a config file is generated at config/portal-fix-config.json

This includes the entity whitelist, which entities get despawn immunity:

...
"minecraft:creeper",
"minecraft:spider",
"minecraft:zombified_piglin",
"minecraft:guardian",
"#minecraft:burn_in_daylight",
...and so on

I put in most farmable mobs I could think of, but if the default configuration doesn't suit you, then you can change it.

And an option called persistenceDurationSeconds for setting the length of the grace period in seconds. (default 60)

Commands / Permissions

/portalfix reload - reloads the configuration file

requires the portalfix.reload permission or Operator privileges.

Extra

I am no programming expert, and neither do I have much experience in it.

I'm just a server owner who didn't find any mod to suit my needs, and decided to take matters in my own hands.

This mod was intended to be used only on my server, but I realised that other server owners might be having the same issue, so I publish it both here and on GitHub.

I will admit that I used Claude AI for most of the syntax writing this, because I'm new to Java.

However, I don't blindly trust it - no line was left unexplained and no logic was left overlooked.

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

<1,000
Downloads
Last Updated
CurseForge
Created
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works