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 Jun 18, 2014@shaythegoon
Hey shaythegoon, yea I've tried end-if and skip-if and next-if for the timers and packs all with no result. I've even tried running only this plugin to eliminate any possible plugin conflicts. Would you mind sending me a working example of your world.xml and mobs.xml so I may try it? Maybe there is something wrong with mine somewhere...
-
View User Profile
-
Send Message
Posted Jun 17, 2014Hey Fauvic, Sorry I know this is really late,
Have you tried adding <end-if> tags in to the pack.
Like such:
Just add that to the end of you pack and that should work (works for me)
Shaythegoon
EDIT: next-if works better if you want to have multiple packs in a timer.
-
View User Profile
-
Send Message
Posted Jun 16, 2014@coldandtired
Nope...
-
View User Profile
-
Send Message
Posted Jun 16, 2014@Fauvic Those look good now - is it still not stopping at 2?
-
View User Profile
-
Send Message
Posted Jun 16, 2014@coldandtired
Are you referring to the name of the pack or the name of the mob mentioned inside the pack? In my previous link to you when I first linked the world.xml it did reference the mob to zombie, but since then in trying to get it to work I changed the mob in the mobs file to Zombehs and its name to Zombeh as well as linking the world.xml to the Zombehs mob (all this is in the most recent links). But I've now also changed the pack name to Zombehpack with no result, although if I understand it correctly that name could be anything you like.
debug_log.txt | mobs.xml | world.xml
-
View User Profile
-
Send Message
Posted Jun 16, 2014@Fauvic The coming... thing is from the latest version. I rewrote the conditional stuff to allow it to be used by other projects and didn't add back the debugging yet. Coming... means it found conditions though.
In your case I notice the mob defined in your mobs file is called zombehs but the mob referenced in the pack is zombie. Can you change the pack mob to zombehs and see if it fixes things?
-
View User Profile
-
Send Message
Posted Jun 16, 2014@wokingpanda
You need to create a world.xml file with your world name. Read up on wiki.sylian.eu. You are trying to run the new version of the plugin with the old settings.
-
View User Profile
-
Send Message
Posted Jun 16, 2014@coldandtired
Strange. Here is my debug_log.txt and here is my mobs.xml and world.xml. I tried to keep it as simple as possible for testing. I see in the debug all the select-if and end-if says "coming..."? It makes me think I'm on a previous version but I am definitely on spawns v1.7.9 b6.
-
View User Profile
-
Send Message
Posted Jun 15, 2014[14:49:46] [Server thread/ERROR]: [spawns] No valid worlds found - stopping! [14:49:46] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it [14:49:46] [Server thread/INFO]: Done (3.006s)! For help, type "help" or "?" I keep getting the same problem no matter what he told to put in the config file. help me
-
View User Profile
-
Send Message
Posted Jun 14, 2014@Fauvic I can't replicate this. Can you run the plugin with <write-debug-log>yes</write-debug-log> in the config, then send me the file it creates along with your mobs.xml.
-
View User Profile
-
Send Message
Posted Jun 13, 2014@coldandtired
On average about 10 players. But I was testing this on a test server so at that time it was only me.
-
View User Profile
-
Send Message
Posted Jun 13, 2014@Schlutteh It's missing from that page because there's nothing unique you can set on the cow.
It's now <mob-type>cow</mob-type> (or mushroom_cow). You can also do <mob-type>random</mob-type> but I'm not sure how useful that is :)
-
View User Profile
-
Send Message
Posted Jun 13, 2014@Fauvic How many players are usually on your server?
-
View User Profile
-
Send Message
Posted Jun 12, 2014@coldandtired
On this page:
http://wiki.sylian.eu/spawns/mobs-file
But now I have found the mob types page! Didn't notice it at first, under "all mobs" at the top.
How do I set cow type again...? Was it just <type>mushroom_cow</type> or <cow-type> etc? Been so long since I had to change my config I've forgotten!
-
View User Profile
-
Send Message
Posted Jun 12, 2014@coldandtired
Yea I am using b6. That is the latest one right?
-
View User Profile
-
Send Message
Posted Jun 12, 2014@Fauvic Are you using b6? I remember there was a problem with the timer conditions in previous versions.
-
View User Profile
-
Send Message
Posted Jun 12, 2014@Schlutteh <3
What page is missing the cow? I see it on the mob-types page.
-
View User Profile
-
Send Message
Posted Jun 12, 2014@coldandtired
I'm having some trouble limiting the number of mobs that spawn. Here is my world.xml. The way I have it(which probably has something wrong :P), it should only spawn 2 mobs and then stop. As is stands it just keeps on spawning mobs.
Also, thanks a lot for adding the Citizens support!
-
View User Profile
-
Send Message
Posted Jun 12, 2014@coldandtired
Cow-type seems to be missing from the wiki ;)
(For mushroom_cow...?)
Great job with the updates, you are the most diligent mod/plugin dev I've ever seen!
-
View User Profile
-
Send Message
Posted Jun 4, 2014Wiki should be up-to-date now.