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.
After much, much (much) work the new and improved docs are up! The new location is here.
Hey great work! I'll have to have a proper read through later, just wanted to let you know that /spawns/mob_groups.html seems to be missing. It looks nicely organized though, and your example sheets should be really helpful to new users.
Now... either I missed a Mojang changelog entry or April 1st came early this year... villager riches?!
Most of the pages have been tweaked and merged, so mob groups is now http://docs.sylian.eu/spawns/mobs.html#mob-groups.
Re-reading the docs, it sets the number of emeralds the villager has - https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/Villager.html#getRiches()
Ok I found the broken link; it's under the mobs section "Linking mobs to a group".
How many emeralds they have... now I'm even more confused! I thought they had unlimited emeralds!
Cheers, I've edited it.
I don't really know how it works, I just saw a new value and added an option :) I do see a lot of new stuff in the villager API that also needs to be added in the near future.
1.11.2 b1
Hello
I get this Error message:
[Server thread/ERROR]: [spawns] No valid worlds defined - stopping
I have to define worlds?
Where and how can i define valid worlds?
Greetings and merry christmas
Thomas
Works fine in 1.11.2
I'm getting the same error message I always get, but it doesn't seem to affect anything at all:
23.12 16:06:07 [Server] INFO java.lang.IllegalArgumentException: Profession is reserved for Zombies: NORMAL 23.12 16:06:07 [Server] WARN Task #14 for spawns v1.11 b1 generated an exception
I get this even when I don't have zombie spawns, and when I do they still spawn fine anyhow. So it's probably not worth worrying about.
Here's something I can't figure out; one of my players has requested that no baby zombies spawn around him, is this possible through conversions or something? Or would I have to ban them globally and respawn them for every other player?
Docs is my Xmas project. I've been experimenting with a new format and moving them to using Sphinx (like readthedocs.com) as a wiki is overkill for me.
From what I remember, Spawns doesn't have any code to change the default mobs once they've spawned. Its brother, Mobs, handled all that. I've been slowly merging them for a long time but real life is constantly interrupting :(
New site layout here, replies are different and my old avatar is gone... I don't like change!
There's a lot of info to link, I don't envy that task. Hopefully you can copy/paste a lot of the descriptions etc. I still use it when I have to make something new, I just look at the new version's update info for the latest additions.
It's ok the baby zombies problem was only for one player, he'll just have to "get gud". If you wanna stick to unenchanted iron armor you're gonna have a bad time...
Working great in 1.11 - Just a few minor things I needed to correct that you might be able to add/change on your wiki: In the mobs section I think it would be good to have a link to Bukkit's entity id list, although we know how to type them exactly it can be confusing to new users to type the names with underscore etc. I noticed this when I typed wither-skeleton (as per your update notes on 1.11 b1! Whoops!) where it should be wither_skeleton.
And the wiki still has variant in the mob section. Which is tricky, because it is still needed for 1.7-1.9 users but not 1.11+.... so maybe a note/asterisk?
On another note, just wanted to say I admire your dedication to the small group of us that use Spawns. This plugin is WAY underused, I think a lot more servers should be using this. I think the reason that none of us have uploaded example configs is that we're worried about our crappy code and weird creations going public! It would really help new users though, writing configs from scratch is a challenge.
@coldandtired
LOVE THIS MAN! Thanks so much for the updates and feature additions!
@Schlutteh <color> and <style> are still good for horses, and <color> also works on llamas.
<variant> will be ignored; now you have to use mule, donkey, zombie-horse etc. as distinct mobs. Same goes for skeleton.type, etc.
They're still in the API but deprecated (marked to be removed in the future). It might be a while but I decided to do it now before I forgot!
<carrying-chest> doesn't apply to horses anymore, only to the other three, but otherwise you're correct.
@coldandtired
Ah yes, probably something about vanilla changing entity names and files to be all lowercase, but I can't see if it's been changed in Bukkit yet.
Oh there's something I'll need to update then, horses. So horse <variant> will no longer be valid, thanks for the heads up. Are <color> and <style> still valid for horses?
I'm not sure if I understand the horse.carryingchest part though. Does it just mean we can add <carrying-chest>true</carrying-chest> to horse, donkey, mule, llama (and no other mobs)?
1.11 b1 is up.
Upgraded to 1.11, but an early release so be careful.
There have been many internal changes to the Bukkit API, which this update addresses. Generally it makes life easier but most configs will need to be tweaked.
Horses have been split into separate mobs
Guardians have also been split.
Skeletons have also been split.
Zombies have also been split.
And some new mobs
Please see this page for the changelog.
@Schlutteh You're always welcome here :)
As the new hostiles only spawn in the new generated structures, and don't respawn, I'll definitely be using Spawns to place them elsewhere. Vex, Evoker, Vindicator (but I don't know what their Bukkit code names will be, or if they have even been added to the API yet).
I'm not updating to 1.11 until next week probably, still too many bugs.
@coldandtired
Spawns defiantly needs a update. There are a few new mobs also. http://pastebin.com/X73Vxe83
@coldandtired
Oh, well I stand corrected!
(slowly backs out of the room)