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)&[email protected]&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.
@coldandtired
That's great, thanks!
(don't forget to add to wiki!)
Looking forward to my invisibats being quiet, the squeaking was betraying their presence :)
@Schlutteh Okay, added four new properties: glowing, gravity, invulnerable, and silent. All are boolean types.
I haven't had any time to test these so caveat emptor!
Whoo 1.10 nice!
I have a minor feature request for the future; One of the later additions to the CraftBukkit code was a hook for the entity tag "isSilent", think it could be added to mob values?
Again though, minor request, no pressing need for it to be added.
Guys, no arguing, I love you both :)
A 1.9.4 build is now up here.
@Schlutteh
Could you please just ignore me as I have been trying to do to you. Thanks ZachryWilsn
@Schlutteh
This will be broken no matter what build of spigot 1.9.4 is used, it is an updated NMS class issue.
@zachrywilsn
Never use the first build of an update, give it a bit more time!
We need a update for 1.9.4.
Just a heads up.
@bonnydust
I have fixed this issue by using lowercase in the file name even though my world name is in capitals.
I am still getting this error, my world name is LTD, the world file created for spawns is LTD.xml and placed inside the "spawns" plug in folder.
<<reply 2778781="">>
No problem, just add the <riding> condition and the type of mob to be ridden, or the name of the custom mob to be ridden. Here's one of mine;
That's the rider, and here's the mount;
I'm actually looking for a plugin ansering exactly to that demand : having not only per-biome mob spawns (spider in forest, zombie in swamps, skeletons in custom dungeons like ancient tombs, etc...)
I'd also like to spawn custom combinations of horses (especially the zombie and skeleotn horses) with mobs riding them... Which, to be honest, is one of the main reason I'd chose this plugin over another IS that possible with spawns ? I've read in the comments that it seems to be, but how would you do it ?
Thanks for your answer
@coldandtired
Scratch that, I got unexpected results; Zombie riding a zombie horse and the zombie was actually in control of it!
There's a little bit of a desync between the rider and mount, but it's still pretty damn cool. Much better than how it used to be, with the rider just sitting there with no pathfinding ability.
Awesome!
@Schlutteh I did have to change the code a little for riding, as there can now be more than one (according to the API).
I remember this always being problematic but I'll try to do a little testing this weekend to see if it's working better now.
@coldandtired
Works great! No errors in the log at all.
I'm just wondering have you changed (or will change) <riding> to the new "passengers" data of vanilla 1.9? I was never able to get my Spawns mobs working with riders in 1.8, they would always just spawn in the same block space but not connected to their mount. Maybe the new passengers data will be easier to work with.
Happy to see you're still around too :) I've moved from CraftBukkit to Spigot, no noticeable differences with plugin compatibility. They are still catching up with their 1.9 API, but it's much faster than 1.8's update.
@Schlutteh This one has been built with 1.9 so it should be fine.
I'm still around but things have definitely got a lot quieter. I'm keeping an eye on Sponge and watching the API develop.
It was worth a shot, but trying Spawns in 1.9 Spigot didn't work at all. Damn! Any chance you'll come back for an update? This plugin is SO good... and I spent so much time writing my configs!
Bother bother bother. Hit me up on Steam when you have a chance? Twitter works too, I have DMs on.
has any one found a vanilla-ish setup config for this? Would some one please post any config for me?
@freakytoad1
Just give them X/Y/Z conditions + distance from player