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 Mar 27, 2014@ferrago Okay, there's now a link on the site. Bukkit dev builds usually have a few things missing for the first few builds so if you get any weird errors try reverting to the beta version to see if they are still there.
-
View User Profile
-
Send Message
Posted Mar 27, 2014@zachrywilsn Many thanks <3 I've spent so many hours writing this and it's nice to know it is useful for admins and not just just for my programming practice! ;)
-
View User Profile
-
Send Message
Posted Mar 27, 2014I was wondering if you would mind pm'ing me the dev build or put it in the beta link on your website. My server is in the development stages still, and the biggest thing left unfinished is our combat system, which I had been using your plugin plus a plugin I created to test.
-
View User Profile
-
Send Message
Posted Mar 26, 2014@coldandtired
You Are A Amazing Man! Thank you so much for real!!!!! I made a donation to spawns I do hope it helps get you coffee or my suggestion the new titan fall :) - Ive Pm'ed you a lil more info on how my issue was fix. All in all "coldandtired" Is a BAD ASS!!!
thanks again, zachrywilsn
-
View User Profile
-
Send Message
Posted Mar 26, 2014@zachrywilsn The first error seems to be fixed by updating Spigot. The second error means that the protocol has changed. I've PM'ed you a dev version which might fix it.
-
View User Profile
-
Send Message
Posted Mar 26, 2014@coldandtired Thats the error msg Build#1357 Spigot - Also me and other have been having server crashes due to this info here - http://www.spigotmc.org/threads/crashing-urgent.14811 - If you get a update please let me know in a pm etc. I dont know if i can even be up and running if the above link keeps happening.
Current Error. http://pastebin.com/SwwN8mxf
-
View User Profile
-
Send Message
Posted Mar 24, 2014@zachrywilsn Most things a plugin can do have to be on the main thread. There are a few exceptions but they are generally limited (checking for updates, database stuff, etc.)
This means that the MC stuff, my stuff, and those from other plugins on the server are all fighting for the same cycles. Spawns is relatively demanding due to its nature so I try to optimize it as much as possible.
Checking dozens of complicated conditions every tick might have a negative effect on some servers due to this, and it's impossible for me to test for. Still, I can add it and people can use it if it works okay.
I stopped checking the Bukkit build log as there wasn't any activity for over a month so didn't see the dev builds update. I'll put something up later.
-
View User Profile
-
Send Message
Posted Mar 24, 2014@coldandtired
" I'm not sure how expensive it would be for the server" What do you mean by this cost? Also spigot is up to 1.7.5 and spawns will not run with it. Updates soon? or is there already a dev build?
-
View User Profile
-
Send Message
Posted Mar 17, 2014There is now a link to the beta version on my site. The documentation has also been switched to the new format.
Feel free to play with it as I finish the docs and let me know about any problems/requests, etc.
It's almost certainly not fit for a real server but it should be pretty close.
-
View User Profile
-
Send Message
Posted Mar 2, 2014@Spearhartt Currently no, The whole concept of data values is being changed at the moment and there doesn't seem to be any clear information about how it will work in the future.
-
View User Profile
-
Send Message
Posted Mar 1, 2014Under the <helmet> parameter is it possible to specify a data value? The reason I ask is because I would like to be able to equip the mobs I spawn with different skulls.
-
View User Profile
-
Send Message
Posted Feb 28, 2014@xXBadeye It's an interesting idea but probably not really doable as you describe.
MC (and Spawns) spawning is based around players and their positions. MC uses very few conditions to determine what can spawn where. Basically it checks mob counts at the beginning of a cycle, light levels, and solid blocks.
Every players has almost 300 blocks chosen at random (1 per chunk from the chunks in a square around the player). If this block is water a water pack will spawn, if it's air a random mob (from the ones that pass the above conditions) will spawn in a pack around this block. What this means is that each spawning mob has no real concept of the world around it, the other types and numbers of mobs, etc. Only that the block it's standing on is suitable to spawn on (even that isn't always right and you get sheep in trees and such).
Spawns (the upcoming version) adds much more control to that, but more importantly adds a lot of that awareness so that a spawning mob can check multiple conditions about its surroundings.
More relevant to your situation is that I've added the ability to define blocks in the config that act as spawning centres (like the players I mentioned above). This means that you can easily define some blocks from within your cities and spawn more mobs there than normal.
While I haven't got a surrounding-blocks condition I can easily add one. I'm not sure how expensive it would be for the server but it would allow for dynamic stuff. Also, I will be adding Mobs-style actions to Spawns so you can spawn a zombie, check the surroundings, and then spawn another five of them if you like.
-
View User Profile
-
Send Message
Posted Feb 28, 2014@coldandtired
Would it be possible to say I want to have something like a zombie-only-spawn-in-polulated-areas, e.g. spawning more common in a radius on the x/z axis of let's say 30 blocks around a brick block (example) and on the y-axis 5 blocks? You could add a config option for that and an aray string, which is set to materialName,xRadius,yRadius,monster,multiplier (multipler must be a float or double variable) or something similar. With the string split you could split each string at the comma, so you would have:
BlockList[0] = Block
BlockList[1] = x
BlockList[2] = y
BlockList[3] = entity
BlockList[4] = spawnMultipler
Now you could add if statements, check for the entity with BlockList[3], check for the position the entity should spawn on the EntitySpawnEvent, check for blocks around it (with the values you've got from BlockList[1] and BlockList[2]), compare these blocks with BlockList[0]. Now if everything fits, the block is in the radius and the entity is part of the list, you could modify the spawns with the multipler given with BlockList[4].
Maybe another value could be added, that defines how many blocks should be in the radius of the given type in order to increase the spawns. So that 1 cobblestone block is not enough, you'd need at least 20 of them in a radius of 30 blocks for spawn increasement.
Another config option could decrease the spawn in non-polulated areas (outside of the block radius), so you would have alot of zombies in teh citys, but not in the woods if you set the block type to let's say cobblestone.
Example with materialName,xRadius,yRadius,monster,multiplier,minBlocksOfThatType:
Populated-Spawns:
- DIRT,30,5,ZOMBIE,2.5,5
Zombies would spawn 2.5x more if around them are 5 Dirt blocks in a radius of x=30 and y=5.
Just an idea, but i'd like to see this somewhere :)
-
View User Profile
-
Send Message
Posted Feb 27, 2014@coldandtired
Lock-age was only broken for sheep, I believe their grazing behavior messes with it but I don't know if it's Bukkit or Spawns. I wouldn't worry about it too much, just means no permanently baby sheep for the petting zoo!
-
View User Profile
-
Send Message
Posted Feb 27, 2014Another page added to the new tutorial - http://spawns.sylian.eu/spawning/
-
View User Profile
-
Send Message
Posted Feb 26, 2014@Schlutteh I didn't know lock-age was broken. Most likely that's a Bukkit bug but I'll add extra checks for it.
Started work on the new tutorial - http://spawns.sylian.eu/overview/ Except for the spawningCentre name (which doesn't really matter) that should be the final system.
-
View User Profile
-
Send Message
Posted Feb 18, 2014@coldandtired
Oh boy there will be questions!
But first I'll worry about converting my old config/s to the new system, then add some fun stuff.
It's no big deal either way, but will baby sheep with the <lock-age> element be fixed in this update? Eating grass was causing them to lose this tag and mature to adult size.
-
View User Profile
-
Send Message
Posted Feb 18, 2014As the next update is nearing completion I've started making notes about what has changed and improved. If anyone's interested I've put up a page here detailing some of the changes.
If you have any questions put them here and I'll answer them. I believe I've got about 95% of everything on that page working as expected along with some other stuff.
-
View User Profile
-
Send Message
Posted Feb 10, 2014@McSaber
@Schlutteh
It's coming. Hopefully I can steal a lot of the code from Mobs to make life easier. This will all be done in the update after next.
Regarding the next update, it's getting closer. (renameable)conditions are pretty much finished and after that I just need to rewire all the mob stuff (HP, etc.) to use them. Then testing and done. I'll probably release it at the same time I start the docs as the new config is almost fully compatible with the old one.
-
View User Profile
-
Send Message
Posted Feb 9, 2014I'm hoping to convince C&T to roll both Mobs and Spawns into one mega-plugin!