No Mob Farms

No Mob Farms

Mod

A mod that hampers mob farms

Server Utility

300 downloads
5 followers
Created3 years ago
Updated2 years ago

Follow Save
Host your Minecraft server on BisectHosting - get 25% off your first month with code MODRINTH.

This is a Fabric server-side mod that implements various countermeasures against mob farms.

Natural Spawner Nerf

This applies to "naturally spawned" mobs (that is, not through a mob spawner or structure generation), including the ones that continuously spawn in structures like Guardians. It detects when mobs originating from certain chunks die too frequently and slows down their spawn rates.

The algorithm can be configured through the nomobfarm.properties file:

natural_slowdown_rate=1000         # Rate at which mob spawns are slowed down relative to the
                                   # mob death frequency. Higher values lead to longer intervals in which
                                   # mobs won't spawn.
natural_recovery_rate=3.0E-4 # Rate at which the spawn algorithm goes back to normal
                                   # when mobs aren't dying.. It's essentially the rate at which the algorithm
                                   # "forgets" how many mobs died.
natural_max_wait=100000            # Maximum interval (in ticks) in which mobs won't spawn.
natural_min_deaths=0               # Minimum number of mob deaths to trigger the slowdown
natural_offline_persistence=259200 # How long the data about a chunk should persist since the last write (in
                                   # seconds). Default is 3 real world days, which means that if a chunk is
                                   # left alone for 3 days it will be restored to normal. This is different
                                   # than the recovery rate, because the latter is used while the chunk is
                                   # still loaded and depends on the death counter.

With these default values, the algorithm is moderately aggressive. It quickly curbs spawn rates when more than a few mobs from the same chunk die in a short time (because rapid, consecutive spawn batches in the same area are indicative of spawn mechanics abuse), but still allows mobs to spawn once in a while. Decrease the value of slowdown_rate to make it more conservative, increase max_wait and decrease recovery_rate to further reduce the rates for suspicious chunks.

You can disable this feature by setting natural_max_wait to 0.

Mob Spawner Nerf

This applies to mob spawner blocks. The default values are:

spawner_slowdown_rate=30
spawner_recovery_rate=0.001
spawner_max_wait=10000
spawner_min_deaths=15
spawner_offline_persistence=259200

These values are rather conservative because, unlike for the other type of spawn mechanic, there's no obvious sign that the mobs are being spawned inside of a farm, at least based purely on the spawn/death rates, and also because spawners already have their own delay. This configuration will progressively slow down the spawner after at least 15 mobs die, though still allowing some mob spawns once in a while and allowing the spawner to go back to normal if its mobs aren't dying for a while (or aren't spawning at all), as long as the chunk remains loaded (and ticking).  The idea is that a player using the spawner legitimately would likely be discouraged by the slowdown and leave, allowing it to go back to normal after a while, while a farm would have to be used for a longer time to be actually worth building, which would cause the spawner to reach a high number of cumulated deaths and take a lot of time to go back to normal.

You can disable this feature by setting spawner_max_wait to 0.

Iron Farm Nerf

Controlled by the config option golem_detection_memory=10000, which adds to the time interval (in ticks) in which villagers won't spawn a golem after seeing one. Set to 0 to disable.

Raid Farm Countermeasures

raid_center_min_randomization=16
raid_center_max_randomization=24

These two values regulate how much the position of the raid center is randomized, which hampers raid farms in which there's a single, small spawn platform. Although the default values should cause existing designs to fail most of the times, players who are aware of this randomization could redesign their farms to take it into account. In that case increasing the raid_center_max_randomization value would make it harder to elude the countermeasure, but also reduce the fail rate.

Set both to 0 to disable this feature.

raid_min_size=512

This is the mininum "area" of a village required to start a raid. This breaks most existing raid farm designs, including the ones without a specific spawn platform. The area calculated is that of a rectangle that includes all the POIs (claimed beds and workstations) within 64 blocks of the player. As a side effect, this feature might also affect very sparse natural villages, particularly if they have been just found and the beds aren't claimed yet, or the terrain causes the villagers to be unable to find them. It will also affect natural villages where most villagers have died.

Set to 0 to disable this feature.

raid_no_bad_omen_loop=true

Prevents illagers that were previously spawned in a raid and left it from giving the bad omen effect. This prevents infinite raid farms from starting raids other than the first one.


Project members

orlouge

Owner


Technical information

License
MIT
Client side
unsupported
Server side
required
Project ID