ThrottleMobSpawn
Mob grinders in Minecraft are player-created structures that cause a large amount of mobs to spawn in one area so that they can be killed for items and experience. These can be built using mob spawners, or just general spawning due to low light levels. This can cause lag, especially if left to build up for long periods, and is quite frankly a very easy way of getting large amounts of experience and items. If you don't want lag or don't want to make the game too easy, you can disable both kinds of mob grinders using this plugin.
It works by monitoring the number of spawns per chunk of different kinds, and capping them at a given rates, as set in its config YAML. The default cap is 16 spawns per hour. This should not affect the natural spawning rates of mobs, but it should prevent mobs from being artificially caused to spawn more often.
Full customisation is possible, including setting individual spawn rates for all known causes, changing the time interval and max spawns per cap and changing the global and individual spawn rates per world.
Features
- Caps the spawn rate of mobs to a maximum number in a given time frame per chunk
- Different worlds can have different rates
- Different types of spawning can have different rates e.g. Spawner, Breeding, Natural etc
- Rates are settable in the config file before running or in a command while running
- Reduces or eliminates lag caused by mob grinders
Future Development
- Rewrite to make it rule-based, where you can set up multiple rules for the same type of spawn at different intervals and amounts
View the source code or contribute to the project on Github.
Commands
Command | Description |
---|---|
/SetMobSpawnRate [max spawns] [interval] | Sets the server-wide default spawn rate to a maximum number of spawns in a time interval in whole minutes |
/SetMobSpawnRate [spawn reason] [max spawns] [interval] | Sets the server-wide default spawn rate for a specific spawn reason to a maximum number of spawns in a time interval in whole minutes |
/SetMobSpawnRate [world] [max spawns] [interval] | Sets the default spawn rate for a given world to a maximum number of spawns in a time interval in whole minutes |
/SetMobSpawnRate [world] [spawn reason] [max spawns] [interval] | Sets the spawn rate for a specific spawn reason within a given world to a maximum number of spawns in a time interval in whole minutes |
Permissions
- throttlemobspawn.setmobspawnrate (default op) - Allows use of the SetMobSpawnRate command
Configuration
See http://dev.bukkit.org/bukkit-plugins/throttlemobspawn/pages/configuration/
Troubleshooting
This plugin uses Java 7
If you get the followed error on starting up the server with this plugin installed "Unsupported major.minor version 51.0". This means you are using an out of date version of Java. If you don't know how to upgrade, please contact your server hosting provider and ask them for help in upgrading to Java 7, or contact Oracle customer support. Mac OS X users require JDK 7 instead of JRE 7.
Donations
If you'd like to contribute towards the continued development, support and maintenance of this project, please consider joining me on Patreon, and making a one-time or recurring pledge.
Help
If you need help you can leave a comment below and I will get back to you as soon as I can. You can also join my IRC chatroom using the following link. Please note, I am not always at my keyboard! http://webchat.esper.net/?channels=XHawk87&prompt=1
will it be updated for 1.6.1?
@XHawk87
Awesome. Thanks!
@dreniarb
I can add options to customise which types of animals are spawn throttled in the next version.
Would it be possible to adjust the plugin so that it doesn't prevent pigs, cows, and sheep from procreating?
@ryvix
Sorry, the source code is not hosted anywhere at present. Feel free to decompile it, it is not obfuscated so it should come out pretty close to how it was written.
Hey, this looks pretty neat. Do you have any source code for this thing available? Thanks =)
@Zeritius
The command syntax convention for Bukkit plugins (and pretty much any console command system I have ever seen) is to surround required arguments with [square brackets]. These should be replaced with the value, you must not include the square brackets themselves. Likewise with (round brackets) these imply that this argument is not always required. You replace or remove the argument with the value, you must not include the round brackets themselves.
What you should have been typing is: /SetMobSpawnRate 20 1
P.S. Also, do you realise that a well-prepared Mob Spawner grinder will produce on average about 10 mobs per minute? Setting the throttle to 20 per minute will have no effect on these kinds of grinders. It also works chunk by chunk, so each 16x16 area will be allowed to spawn 20 mobs every minute. As mobs can spawn in a 15x15 chunk area around the player, this means that a spawn tick mob grinder could produce at most 75 mobs every second. The default values for /SetMobSpawnRate are 16 60 (16 spawns per hour)
Hey, I wanna make it so that the spawn rate for mobs on my server is 20 mobs per minute, but I can't really navigate around your plugin. Everytime I type in /SetMobSpawnRate ([world]) [20] [1]
it just gives me back
/SetMobSpawnRate ([world]) [spawns] [interval]
I've probably missed out on a major detail, but what am I supposed to type?
@XHawk87
K cool. I will let my players know.
@islandmat
It actually works per chunk, so it does actually work as you describe so long as the spawners are not in the same chunk.
@XHawk87
I have a suggestion, would it be possible to make it... like 16 spawns, per spawner, per hour? Like so only 16 mobs can spawn from 1 spawner an hour, but if you have another spawner u can spawn another 16? Like maybe add it in a future update?
@islandmat
:D
@XHawk87
Cool thanks for the info. Again great plugin. LOL everyone was so mad when there mobs stopped spawning. XD
@islandmat
Thanks. The time interval is indeed in minutes, just like in the command for setting it. The default is to limit a chunk to 16 spawns per hour, but you can tweak it to suit your purposes.
This is a great plugin. Works 100%. Ummm is the time in the config in minutes (60 mins) or seconds? Anyway this is a great plugin as my server has a "get money for killing mobs plugin" so it stops those cheaters. Thanks.
If you like this plugin, please leave a comment here. I really appreciate feedback, good or bad, and I am more likely to maintain a project with comments.
If you have any problems or questions, please feel free to post here, and I will do my best to help you.