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
Undead cavalry! I look forward to THAT update!
Hopefully the undead horses would despawn though, otherwise it might become a problem...
And @ RivfaderAldhissla - I posted a picture below of the giants spawning on my server. They spawn like crazy due to my damn-near-unrestrictive conditions. But they are slow and dumb, so not too much of a threat unless they step on you.
@coldandtired: That's great news! But I am still curious whether giants actually are supported by this plugin. Have anyone actually been able to confirm that they are indeed possible to spawn? I sure can't.
@Schlutteh Horses are friendly mobs always (I think).
Your second thing was something I started but had to postpone due to time restraints. It is something I will be adding though.
@RivfaderAldhissla I'll fix the spiders thing, I know where it is.
@coldandtired
Wait.... we can spawn the undead and skeleton horses?! Awesome!
Ok before I kill my server: Do they despawn? Are they a "hostile" mob? Just asking in case they are persistant like regular horses, and I overload my map with entities.
Also... Is it possible to have, for example, a skeleton riding a skeleton horse:
<skeleton>
<id>dark-rider</id>
<pack-limit>2</pack-limit>
<riding>horse
<variant>skeleton_horse</variant>
</riding>
<spawn-if> (etc....)
Or am I just setting my sights too high...?
@RivfaderAldhissla
I can confirm: http://i.imgur.com/JdYlO86.jpg With names, too! (optional)
After toying around a while with Spawns I found a somewhat tragic bug: spiders tend to spawn with one fourth or more inside a wall, thus dying from suffocation.
I am beginning to suspect that giants are indeed broken as well, no matter what I try I remain unable to get one to spawn. Can you confirm that they work?
@RivfaderAldhissla Yes it does. You can use custom biome names in exactly the same way as normal biome names.
@coldandtired: Ah, thanks. I gotta say, this plugin combined with mobs is a powerful alliance! Well done on both of them! One more question though, does your plugins support TerrainControl? adding the possibility to bind these altered mobs to specific edited biomes would seem like something worthwhile? I may recall seeing something about such support earlier, but I just can't remember!
@RivfaderAldhissla Seems that information wasn't on the site, although I swear I had typed it somewhere! I've updated the mobs page with links to horse styles, variants, and colours.
You are correct, horse variants deal with the undead, skeleton, etc. horses. The full list is here.
Hello again. I am guessing that the "variant" value refers to either skeleton- or zombie- horses? I am having a bit of a struggle finding the exact vocabulary for different mobs, for example those two horse-types, is this information posted somewhere I have overlooked?
@Radyth That's how it's supposed to work. When you set a minimum limit (like vanilla MC) the mob can't spawn closer than that to any player, which means if the distance is fine for player A but this would spawn the mob right next to player B, it won't spawn.
When you use a range or a maximum limit the same rule applies, so it has to be a good distance for all players. It's almost useless but I added it to be used if, for example, all the players act as a team and go through a dungeon together.
In your case you would achieve the results the want by setting a minimum limit and enforce a maximum limit by setting the chunk-radius value. For example, setting the chunk radius to 1 will use an area of 9 chunks for each player (a 3x3 square centred on the player). This is in effect a maximum blocks from player of 17-31 (depending where the player is in the chunk). By setting blocks-from-player to something like above 8 you will generally see mobs spawning in the next chunk to each player.
Hi, I'm having an odd issue where mobs won't spawn at all if there are multiple people on the server. As soon as everyone but one person logs off, the mobs will immediately start spawning again. Any ideas?
I'm wondering if maybe it's checking to see if all players are within range of each mob since I'm using a range for the blocks-from-player condition instead of just checking to make sure that the mobs are far away from each player.
<<reply 1728672="">>
It doesn't quite work that way. The spawns are triggered solely by a timer, and the conditions serve to block the spawning.
I could add a separate Y-blocks condition but you could also change the current blocks-from-player condition to specify the maximum, rather than minimum, range away from players.
This example would stop the mob from spawning more than 19 blocks above you.
Hey coldandtired, first of all I love the plugin. It's been very helpful in the project I'm working on. I was wondering if it was possible to have conditions based on what Y coordinate the triggering player is at. As an example, if I'm way underground I would like to prevent mobs from spawning on the surface.
<<reply 1720349="">>
That can't really work. Spawns is a system-wide low-level plugin - most of it doesn't even go through Bukkit at all. It replaces almost all the default spawning behaviour.
Also, I've already written what is very likely the most in-depth mob customization plugin :)
Any other plugin can easily work with spawns as it creates mobs which are indistinguishable from vanilla mobs. Mobs, on the other hand, can easily work with most other plugins as it can alter whatever they've done, if desired.
hay i give a look at htis plugin maby you can hook in to it and make it so we can make mobs in game and mod thim in game to http://dev.bukkit.org/bukkit-plugins/nbteditor/
@coldandtired
It's just been me flying around under the islands.
@SXRWahrheit Is it possible that players are walking on the top of the island and they're less than 24 blocks away?
SXRWahrheit:
I have had much more luck spawning specific mobs by adding biome conditions, without the biomes listed it seems a lot harder to get them to spawn. Check if the floating islands have their own biome type (I don't know that mod), and if so then add it to the conditions and see if that helps.