No Mob Farms

No Mob Farms

346k Downloads

Add: Config options to fully suppress mob spawns after many mob deaths

James103 opened this issue ยท 2 comments

commented

natural_max_deaths: Maximum number of mob deaths before mob spawning is suppressed. Set -1 to disable.
natural_overload_cooldown: How long mob spawns should be suppressed for when too many mobs die (in ticks).

spawner_max_deaths
spawner_overload_cooldown
Same as above, but applies to spawners.

These variables allow server operators to

  1. Further reduce the rates of mob farms by adding additional cooldowns when too many mobs die at once.
  2. Allow players to (temporarily or permanently) spawn-proof areas by killing mobs.
  3. Encourage players to explore so that they can continue to hunt and kill mobs.

Note that this may make various hostile mob drops effectively non-renewable, especially if overload_cooldown is set very large.

commented

The overload_cooldown option already exists, it's called slowdown_rate, which is the number of ticks spawns are suppressed for every time a mob dies, multiplied by the amortized death count. As for max_deaths, it's not clear if this should be temporary or permanent, and whether it should bypass the offline persistence limit. A temporary limit is unnecessary, as the algorithm already does that by accumulating the delays from the slowdown_rate. There's also the fact that the death counter is resetted over time, should max_death also bypass this? If not, it might not even be possible to reach that number, while a low number would permanently disable mobs in a chunk just for killing a few mobs. Perhaps it would be better to set a maximum delay after which it's treated as if it was infinite, though the question of whether this should bypass the expiry date for offline data persists.
For now, I recommend setting offline_persistence to a very high value (maximum is a bit over 2 billion, equivalent to ~70 years).

commented

In other words, to emulate having a finite amount of mob spawns per chunk,
recovery_rate should be 0.
max_wait should be much higher, such as 2147483647.
offline_persistence should be much higher, such as 2147483647.

Instead, maybe add max_delay. When the current interval between mob spawns exceeds this value, it is treated as if it is infinite.