SlimeChunkDisabler
Using this plugin on your server, players with the necessary permissions will be able to stop slimes from spawning in a slime chunk, useful for when your base is being over-run by the buggers.
If you also install my other plugin 'SlimeChunkDetector', you will be able to locate slime chunks in your SMP world and then disable them if need be.
Usage
To disable a slime chunk from spawning:
- Locate a slime chunk
- Stand on any block inside that chunk and type:
- /scd disableSlime
To re-enable a previously disabled slime chunk:
- Locate the slime chunk
- While standing on any block inside of it, type:
- /scd enableSlime
To see what status a slime chunk is (either disabled or enabled):
- Locate a slime chunk
- While standing on any block inside of it, type:
- /scd info
Permissions
Using your permissions plugin of choice, make sure the player or group has the permission 'scd.canuse', if they don't, they won't be able to use any of the plugins.
Reason for creating
This plugin was created because several of the players on my server created their bases where they wanted to, without fully realising that it was either inside or partially inside or even next to a slime chunk(s).
Slime chunks are awesome if they are in the place you want them, but if part of your base is inside of it, it can be a nuisance, so i created the plugin to allow our players to disable the slime chunk, thus freeing them of the annoyance that is slimes inside their bases.
Changelog
v0.1 - initial creation of plugin - all main mechanics are there, disabling, enabling, info, permissions support. - may be missing some features that i haven't thought of yet.
Requirements
This plugin requires MySQL.
Configuration
To use this plugin, you need to have a MySQL server with a database for it.
The plugin automatically creates a default configuration file (config.yml), you just need to modify it so that it knows about your MySQL server.
mysql_server: <ip address of the server or just 'localhost'> mysql_port: '3306' mysql_user: <mysql username> mysql_pass: <mysql password> mysql_database: <database name> mysql_slime_disable_table: <table to store the chunk data in> mysql_table_prefix: <prefix for the tables>
Example configuration
mysql_server: localhost mysql_port: '3306' mysql_user: root mysql_pass: '' mysql_database: slime_disable mysql_slime_disable_table: slime_chunks mysql_table_prefix: sd_
This plugin requires an abanonded dependency, any chance for an update?
v0.6 uploaded just waiting on approval.
Compiled against CB1.3.1-R1.0 and now requires Sync for accessing the SQL database.
It should no longer reach the MySQL connection limit like the old version was doing.
Working on a 1.3.1 version at present with improved performance.
@Cultist_O
I've not actually found if there is a way to turn the chunk off or not by changing a chunk value.
At present all i do is hook into the entity spawn event, and if the type of entity trying to spawn is a slime i stop it in its tracks and mark it as cancelled.
It isn't necessarilly 100% perfect, and i have found the odd slime spawning in my base (very rare though, and i do mean very rare, i can be in my base for 3hrs and not see a single slime).
Minecraft itself uses a very specific algorithm to determine slime chunks based on the world seed. It basically takes your X coord and Z coord coupled with the world seed, runs it them all through and algorithm that says if the coords match up to a slime chunk coord.
Chunk coordinates are different to player coordinates too, you might be at x150, z200, but the slime chunk might be x10,z50.
Any chance we will gain the ability to turn regular chunks into slime chunks? I am looking for a way to use slimes fairly in competitive maps, and with natural seeming spawning in the right places in RPG style maps. In both of these cases it's a pain to find a set of slime chunks that work out and then build based on their layout.
It would also be useful as on our server there are a number of people copying things from old worlds to the world we generated to take advantage of jungles, etc, and it would be nice to allow their slime grinders and whatnot to continue to function.
If not, do you know of any plugins that give this functionality?
I would also like to ask how you are turning them off, are you suppressing their spawning? or are you changing some value to actually make the chunk a regular chunk? (Or something I've not thought of?) I ask because I'm wondering whether other plugins will be able to recognize the change, and whether the plugin breaking for whatever reason will revert the chunks or not.
Thanks!
v0.5 posted just waiting on approval.
Improved version using the newer version of the SQL library that i use. Should fix up all 'Too Many Connections' errors that some people may see on their console screen.
Nevermind, a newer version of the library does indeed just continue to use that initial connection for the entire duraction, so a simple opening of the connection at plugin start up and a close on plugin shutdown will suffice.
Awesome!
Noticed on the server i originally wrote this for that it was consuming the max connections that MySQL allows. Turns out the SQL library i was using opens a new connection each time you run a query.
Working on a v0.5 that fixes that issue by immediately closing the connection after it has run, would prefer a more persistent connection so that it was only 1 staying open for the entire time of the plugin being up and running, but alas, the library i'm using doesn't support that.
v0.4 posted, waiting for approval.
v0.3 uploaded just waiting on approval.
this version removes all the debug information from the console screen, that way you aren't inundated with the slime information if you are a busy server.
Waiting on 0.2 to be approved, 0.1 has the wrong default values in the configuration file.