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.
<creeper>
<id>mc-creeper</id>
<pack-limit>8</pack-limit>
<spawn-if>
<y>above 4</y>
<world-type>normal</world-type>
<light>below 8</light>
<blocks-from-player>above 23</blocks-from-player>
<blocks-from-spawn>above 23</blocks-from-spawn>
<ground-is-solid/>
</spawn-if>
</creeper>
The creeper in your default file, minus the biome restriction. Is there something that would prevent it from spawning in the kind of area I linked? There are big floating islands, but under them it's plenty dark. If I disable Spawns, normal mob spawning is fine.
@SXRWahrheit I didn't know mobs could spawn with enchanted items. Should be easy to add.
That pic didn't show me much :)
It's probably connected to the inside/outside/sky light conditions, as being under a block, no matter how far away, reduces the light from the sky' level.
I'm having issues getting mobs to spawn with Spawns under some floating islands.
http://i.imgur.com/mcQ69tC.png
Things seem to be okay on "regular" land, but here it's rather barren.
Is spawning with enchanted items possible, and if so what would the config for that look like?
@Ottha You should be able to use any TC biome names the same way you use normal ones. The plugin first checks to see if the name matches any of the custom biomes, and if not it then checks against the vanilla biomes.
Hey, first of all, this is a great plugin.
I am currently biulding up a new Server, which generates the world with terrain control. As the biomes terrain control generates are not really minecraft biomes, I would like to know if those custom biome names could be used in the xml somehow. Or maybe someone has a better idea to achieve things like, make spiders only spawn near trees.
Thanks in advance, Ottha
@Schlutteh I haven't tried to be honest. There's nothing to stop you adding armour to any mob using the config (for some reason the code exists for all living entities) but it's up to the Minecraft client whether the armour gets displayed and has any effect.
I haven't tried giant slimes yet, but the (zombie) giants are fun. Their buggy hit detection makes it seem like a tougher battle. Is it possible to equip them with weapons & armor?
@Schlutteh Yep, the giant is the only mob still in the code that doesn't spawn naturally. All the rest were removed a long time ago.
I believe giants have quite buggy hit detection (as do giant slimes).
Oh, nevermind.... it was called "human" but was removed already. Gonna have fun with the giants instead!
Do you think it would be possible to add the "Steve" mob? (possibly called "monster" in the code) Does that even still exist, or is it long-since removed?
<<reply 1698850="">>
I think I've found the problem but I've also added some debug code to the latest release. Please check the log if you think the plugin isn't working as it should and let me know if there are any error messages there.
http://dev.bukkit.org/bukkit-plugins/spawns/files/9-1-6-2-b7dev/
<<reply 1698850="">>
I'll be looking into this tonight.
Spawns 1.6.2 b7 with Bukkit #2849 1.6.2-R0.2
Server runs fine (the plugin also work as expected) for a couple of minutes then crashes with this error.
http://hastebin.com/juqupopafu.avrasm
<<reply 1692774="">>
You can limit the mobs based on total mobs, group mobs (hostile/animal/water/ambient), specific mobs (zombie, enderman, etc.) or any combination of these.
You can also use per-player amounts, which are a bit nicer than absolute limits. Or a combination.
One caveat is that the totals are calculated before the cycle starts (like default MC does it) which means you could go slightly over depending on the size of your packs and how likely they are to spawn mobs. Also, these limits only apply to mobs in the config. Any mobs you allow MC to spawn depend on the limits set in bukkit.yml (or server.properties, I forget which).
@coldandtired
So what you're saying is we can limit the number of mobs not only on a world basis, but a per-mob basis? Yisssss.
New update - http://dev.bukkit.org/bukkit-plugins/spawns/files/8-1-6-2-b7/
Weather conditions are element conditions, so simply adding them to the config means they will be checked
Mob count conditions are just like the existing hostile, animal, etc. count conditions. The format is the plural mob name, or the plural mob name plus -per-player
These are only counted at the beginning of the cycle so they are safe to use even in mob conditions.
Apologies for the irregular English plurals! Some plurals that might trip up non-native speakers are endermen, sheep, silverfish, snowmen, squid, witches, and wolves.
At the moment ambient-mobs is the same as bats, and water-mobs is the same as squid. This might change in the future though.
The new command is a way to judge how strictly you should set mob conditions in your config.
From the console the first argument must be the world name. For a player the first argument can be omitted to use the world the player is in, or specified to use a different world.
This plugin has been great for solving the zombie-lag problems of the 1.6 update (by controlling their spawns a lot), also adding more of the rarely-seen mobs has been fun.
Great work!
Thank you this is exactly what i needed. For some reason finding a plugin that controls at what light level mobs spawn was almost impossible.
This gives me that and more. Thanks!
Tutorial updated with the last few additions, added an example page here.
If anything is still not clear or needs to be expanded let me know.