spawns
Spawns is a plugin for Bukkit and Minecraft that allows you to fully customize the spawning behaviour of mobs on your server.
Features
- tweak the default Minecraft spawns or replace them completely
- set mobs to spawn under conditions they never normally would
- block certain mobs from ever spawning
- cause mobs to spawn with potion effects, equipment, saddles, etc.
- cause mobs to spawn in different variants, like powered creeper, wither skeleton, etc.
- mobs appear in the world in the same way as they do normally, so are compatible with all other plugins
Dive right in here to see how to make config files or keep reading for an overview of Minecraft spawning.
Default spawning
Minecraft spawning works like this:
Every spawn cycle (1 tick or 1/20 second by default for hostile mobs) the game makes a list of all the chunks around each player, up to a radius of seven chunks. Each chunk will only be counted once, even if that chunk is around several players.
Once this list is complete a mob limit is calculated. The limit is higher the more chunks are in the list. If the limit is lower than the current amount of a mob type in the world then the cycle will be cancelled.
If the limit is not yet reached a random block from each chunk in the list will be calculated and this chunk will be used as the centre point for a pack of mobs to spawn around. In order to continue, this block must be water for water mobs (only squid so far) and air for any other type of mob.
If this block is suitable then a maximum of 12 random blocks are chosen from up to 20 blocks away, but always at the same height as the centre block.
Lastly, The individual blocks are checked that they can physically fit the mob, so they need to be air, have air above and an opaque block below. The type of mob is chosen based upon the matching conditions (biome, height, floor block type, etc.) and the final mob is chosen randomly from all mobs that are eligible to spawn there. All other mobs in the pack will be the same type.
Permissions
spawns.can-reload-config, which allows the user to reload the config. Default is Op.
spawns.can-count-mobs, which allows the user to display a summary of mob amounts in a world. Default is Op.
Commands
/reload-spawns, or /rs, which reloads the config without having to reload the server. Any mobs already in the world will be unaffected by any changes in the config.
/count-mobs, or /cm, which displays a list of mob numbers in the world. Add a world name argument to specify a world (optional if run as a player) and / or a mob type argument to choose one type of mob to count.
Update checking
If you like, you can set the plugin to check for any newer versions that get released. To do this add an element to the config.xml file, like this:
<check-for-newer-version/>
When this element is present the plugin will report if it finds a newer version. This only works for release builds so you won't be bothered by any beta or dev builds. To disable this checking simply remove the element.
Note that no update will be downloaded even with this set.
Examples
I would love to get any example config/packs/mobs files you have created to add to the docs, so if you have one you're proud of send it in and I'll add it.
spawns took a lot of work, so if your server is enriched by it please consider sending some love my way!
<a href="https://www.paypal.com/cgi-bin/webscr?return=http://dev.bukkit.org/server-mods/mobs/&cn=Add special instructions to the addon author(s)&business=apodlesna@gmail.com&bn=PP-DonationsBF:btndonateCCLG.gif%3ANonHosted&cancelreturn=http%3A%2F%2Fdev.bukkit.org%2Fserver-mods%2Fmobs%2F&lc=US&itemname=spawns+%28from+Bukkit.org%29&cmd=donations&rm=1&noshipping=1¤cycode=USD"><img class="aligncenter" alt="donate" src="https://www.paypalobjects.com/enUS/i/btn/btndonateLG.gif" /></a>
If you're penniless or like spawns but not that much I'm also partial to TF2 items. Send any you don't want my way! STEAM id: coldntired
If you don't know what TF2 is, then start playing! It's free and fun!
For other projects, links, help, etc. please visit the main website.
You can also follow sylian.eu on Twitter for updates.
-
View User Profile
-
Send Message
Posted Nov 18, 2013Update on my memory-problem: This was not caused by spawns, It was caused by a function in NoLagg called 'Lighting' (Attempts to fix block and sky lighting bugs in worlds).
EDIT: The standard setting for this weirdly is to let this function work until there is 100mb left in free memory, so no wonder it ate all my mem, at one point it even capped my whole server (not just minecraft) so everyone lost connection to everything :P Glad it was resolved :)
-
View User Profile
-
Send Message
Posted Nov 18, 2013@SGrayMe Should be fixed in b7, link in the usual place.
-
View User Profile
-
Send Message
Posted Nov 18, 2013@coldandtired
config.xml
http://pastebin.com/raw.php?i=8gYQ8qvH
mobs.xml
http://pastebin.com/raw.php?i=mtVzzZDi
packs.xml
http://pastebin.com/raw.php?i=sv09a7Vg
-
View User Profile
-
Send Message
Posted Nov 18, 2013@SGrayMe Can you post your config files somewhere for me?
-
View User Profile
-
Send Message
Posted Nov 18, 2013@Fuusko Can you test without the shop plugin to confirm, or send me the name of the memory plugin and I'll give it a look.
-
View User Profile
-
Send Message
Posted Nov 18, 2013@Schlutteh \o/ The code is simpler now any other problems should be easier to fix.
-
View User Profile
-
Send Message
Posted Nov 18, 2013I updated a server to using version 1.6.4 b6 this morning and whenever there are players in the world "spawns" interacts with, this sort of error spams the console...
-
View User Profile
-
Send Message
Posted Nov 18, 2013@coldandtired
A relatively short (20 minutes) test of b6 seemed to give more stable/consistent rate of spawns, and eliminated the occasional CPU spikes I used to get. No negative observations made. So from me, so far, goin' great!
-
View User Profile
-
Send Message
Posted Nov 18, 2013@zachrywilsn
Here ya go, enjoy!
Link Removed: http://www.mediafire.com/view/aq600bimwb2v5bi/(Zachry)config.xml
Link Removed: http://www.mediafire.com/view/ucjgn5lkcfp34lp/(Zachry)packs.xml
Link Removed: http://www.mediafire.com/view/9bu68ttokbab82n/(Zachry)mobs.xml
Made to your exact specifications. Nothin' but strong zombies n' animals. Had to make the animals despawn though, so they don't overwhelm and crash your server.
Just take out the (Zachry) part of each filename, and change the <name>world</name> (unless your world file is actually called "world").
-
View User Profile
-
Send Message
Posted Nov 17, 2013@Schlutteh
all id like to do is get zombies to spawn most of the day and night and have animal spawn as well. i dont want any other mob but zombies and animals. and i need zombies to have higher health and deal more damage to payers if possible.
-
View User Profile
-
Send Message
Posted Nov 17, 2013@coldandtired
Hello again, thank you for the update.
Everything seems to be working fine as far as I can tell, haven't noticed any performance loss and have not gotten any crash so far.
EDIT: I just had a weird moment on my server, and the only thing changed are the new spawns b6 and 'shop' - a chestshop plugin. What happened was i got a warning ingame while I was alone on the server, it was a warning from a lag/mem check plugin I have, minecraft was eating memory at a fast pace.. normally java on my server draws 5gb, now it was at 10gb and climbing.. Dunno if this is due to spawns but wanted to let you know just in case.
-
View User Profile
-
Send Message
Posted Nov 16, 2013Okay, a new build is up (download at the usual place if you need it urgently).
Everything has now been moved onto the main thread (which is what that intermittent error was concerning).
I'm not sure whether it's the changes I've made or that Minecraft/Bukkit is more optimized now but I had no trouble with using it this way whereas before it would stutter like mad.
I've marked it Beta due to this large change but it should (theoretically) work exactly as before.
Please can you all try it and let me know if performance has changed significantly?
-
View User Profile
-
Send Message
Posted Nov 16, 2013@Schlutteh Once I've got the next build out of the way I'll look into this, Spawns creates mobs which can easily be affected by other plugins so it's possible to just spawn withers and then find a plugin which will add the tag after for now. I'm not sure if Mobs does it ot but but there must be one out there :)
-
View User Profile
-
Send Message
Posted Nov 16, 2013@Fuusko I've fixed it but in doing so had to mess around with the internals a lot. The good news is that as well as being fixed it seems to be running much faster than before; the bad news the code is in a little disarray at the moment.
I'm trying hard to get it cleaned by tonight but if not I'll put up a dev build with the current progress.
-
View User Profile
-
Send Message
Posted Nov 15, 2013@coldandtired
I think the Colossus is just a colloquial name, but it's just a Wither spawned with an invulnerability tag (normally used to protect the Wither while it's "powering up") of an unusually high number. This has a strange side-effect of making the Wither huge and inverting it (this can be fixed by naming it "grumm").
I saw it on SimplySarc's vid: http://youtu.be/8FwmN7tmLwc
-
View User Profile
-
Send Message
Posted Nov 15, 2013@coldandtired
Great to hear! Had to disable the plugin for now, hope next version comes soon :)
-
View User Profile
-
Send Message
Posted Nov 15, 2013@Fuusko Found this error and am fixing it now. Thanks for the report!
-
View User Profile
-
Send Message
Posted Nov 15, 2013@Schlutteh I can't see anything about it in the docs. Is that the official name? Is it a 1.7 mob?
-
View User Profile
-
Send Message
Posted Nov 14, 2013Is it possible to spawn the Colossus (giant Wither)? I just saw SimplySarc's video on giant mobs, and we already have the abilitly to spawn giants, giant slimes/cubes, and age-modified horses but I'm not sure about the invul tag for Withers. I have some players to terrorize! Ahem... I mean... secret ruins to defend...
-
View User Profile
-
Send Message
Posted Nov 14, 2013Please have a look at this, especially line 29: http://pastebin.com/SunC6cdi