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 May 7, 2014Okay, I got the Mob to spawn, and I added the <world-has-spawned mob-id="CaveSpiderBoss"> tag and after I kill the Mob once, it doesn't respawn. Is this how the system is meant to work with world-has-spawned?
Thanks
shaythegoon
-
View User Profile
-
Send Message
Posted May 7, 2014@shaythegoon That would be a nice idea but I think it would kill the server TPS scanning for block types :)
-
View User Profile
-
Send Message
Posted May 7, 2014Arghh, sorry. I though Blocks was like an ID for a Minecraft Block that the Plugin would search for, such as obsidian; that's why I put 49 xD
I feel like a dumbass, going to try it out, thanks
shaythegoon
-
View User Profile
-
Send Message
Posted May 6, 2014@shaythegoon The checking cg thing is debug code that got left in - I'll remove it tomorrow.
Your config still looks very much like the first version and not like the one I posted a bit earlier.
The blocks element is for a list of specific blocks you want to act as honorary players (the plugin uses the players' locations as hubs).
Say you have a room you want a boss to spawn in, with the floor at y=10 and walls from x=20 +- 5 and z=20 +-5 (to keep things simple). You want the boss to spawn right in the middle of this room, so x=20, y=11, z=20. You put that in the config like this <blocks>20:11:20</blocks>.
Now the plugin will work as if there is a player standing at 20:11:20. As you don't want the packs to spawn anywhere except that exact block you set hub-range to 0. Now the pack centre will use 20:11:20.
You also want a tight pack so you set the pack-range to 0 (although you know the room is 10x10 so you can give the mob a bit of randomness if you like).
With this set you only need to set the hub-attempts and pack-attempts to 1 as they are guaranteed to find a valid block (20:11:20) and likewise you don't need the conditions.
You will however need to add conditions to stop this boss spawning every 5 seconds, using world-has-spawned, for example.
Lastly, you need the empty players element to force the plugin to ignore all players for this timer (otherwise each player will have a boss spawning at their feet!)
-
View User Profile
-
Send Message
Posted May 6, 2014@coldandtired
Thanks again, however i'm still not getting my Cave Spider to spawn xD
Here's some pasties
ServerWorld.xml: http://pastie.org/9147014 Mobs.xml: http://pastie.org/9147016
Sorry this is such a bother, but its nice to learn from the creator.
Shaythegoon
Also, i'm getting this in the console: "checkin cg 1" every interval of my Timer not sure if this helps
-
View User Profile
-
Send Message
Posted May 6, 2014@shaythegoon You use an end-if or next-if condition group, with the pack-has-spawned condition (or hub-has-spawned, etc.)
-
View User Profile
-
Send Message
Posted May 6, 2014Okay i'll try that
Thanks, how do i set the number of Mobs in a pack?
-
View User Profile
-
Send Message
Posted May 6, 2014@shaythegoon You can set the block implicitly and not worry about attempts.
You can add world/mob-count conditions but as you know exactly the block you don't have to worry about that.
You might need to set hub- and pack-range to zero to make sure it spawns on that place.
-
View User Profile
-
Send Message
Posted May 6, 2014Thanks,
i need the Mob to only spawn on one block, cause its a boss mob. But i'll just increase attempts.
shaythegoon
Edit: I just read what you said, yeh of course increasing attempts wouldn't make a difference xD
-
View User Profile
-
Send Message
Posted May 6, 2014@shaythegoon I see a couple of things wrong.
First, in mobs.xml, the hidden-name element will override the name one (or possibly the other way around). Anyway, you don't need both.
In the world file, you have set select-blocks to 50, but this will only work if you have 50 or more blocks defined in the config. Not sure what will happen as is but it might simply default to all the players' locations.
Your condition ground-is-solid must be <ground-is-solid>true</ground-is-solid> (or false). This was changed to avoid doubling up (ground-is-not-solid, etc.) and because the mob properties can have <x-boolean>random</x-boolean>.
The rest looks good though, although your conditions are very harsh. As the pack range is so small, the amount of attempts won't help much as they will be testing the same blocks over and over.
-
View User Profile
-
Send Message
Posted May 5, 2014Hey Cold,
This doesn't appear to be working; just wondering why.
Here is my Mob.xml : http://pastie.org/9143087
Here is my ServerWorld.xml : http://pastie.org/9143084
Many Thanks;
Shaythegoon
-
View User Profile
-
Send Message
Posted May 4, 2014When I was using the newest version I got the. No class def found error so I assumes you hadn't updated to 1.7.9 I know of the bulkier limitations with showing comparability for unofficial beta builds. I will look for the mistake on my side.
-
View User Profile
-
Send Message
Posted May 4, 2014@ferrago The latest beta is for 1.7.9, but Bukkit doesn't want to let devs show it. :(
http://forums.bukkit.org/threads/any-chance-of-updated-game-version-tags.260448/
-
View User Profile
-
Send Message
Posted May 4, 2014Is there a 1.7.9 dev version of your plugin? Trying to get everything as close as possible to 1.8.
-
View User Profile
-
Send Message
Posted May 4, 2014@coldandtired
Thanks, this is looking great :D
Shaythegoon
-
View User Profile
-
Send Message
Posted May 3, 2014@shaythegoon I changed it a little so it now looks like this
with the value coming from the list here - http://wiki.sylian.eu/spawns/mob-types
I did it this way because it's now possible to do this
which is possibly useless but you never know :)
-
View User Profile
-
Send Message
Posted May 3, 2014Hey!
So glad I could see this Plugin get to this stage! I've been messing round with the Beta and testing some stuff for the Server and some stuff for you. Its been going great so far, no unexpected errors, however I do have one question.
How do I change the Mob type?
In the old version of Spawns I could do <type> in the Mobs id. However its not mentioned in the new documentation, has it changed?
Thanks,
Shaythegoon
-
View User Profile
-
Send Message
Posted May 2, 2014@zachrywilsn It is a server mismatch. Although the plugin uses only named NMS methods it's still necessary to specify which version the plugin targets. Not sure if you remember the huge fuss a year or so about this but this was one of the arguments against the change :(
-
View User Profile
-
Send Message
Posted May 2, 2014@WizardCM This isn't done yet. You can use another plugin called Mobs in the interim but I will be adding it soon.
-
View User Profile
-
Send Message
Posted May 2, 2014Fail to launch error - Fig its the server version - worth a look though i suppose - http://pastebin.com/wps96kFR