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.
@whitewolf578 It sounds like the plugin expects at least one timer to always be present so that's why the error.
I've been on holiday but I'll reacquaint myself with it and have a look tomorrow.
@Meswrex Hi,
One of the reasons I love XML is that it has very good support built in. If you have a problem config you can try opening it in any browser and it will tell you (usually with pretty friendly messages) where and what the problem is.
Most common problems are forgetting to close a tag, or issues with <, >, or /.
@whitewolf578
Looks like you missed the section on timers (and maybe hubs too).
I haven't tried convert mobs so I can't give any advice on it, but I'm pretty sure you need at least one timer section in your world file.
Hey so I'm trying to convert skeletons with wither skeletons and spiders with cave spiders in the overworld but it doesn't seem to be working heres what i've done so far, I've done this with the mobs.xml file:
And heres what I've done with the world file:
all that seems to be happening is they just don't convert also in the console it says error no timers in this world file
Is there a console debug output facility for spawns? I am using the <write-debug-log> flag in the config.xml file however this appears to only dump the parsing of the mobs/world configurations and doesn't seem to alert of any parsing errors. I am finding if there's an error in my mobs/world xml files, and attempt to reload the config, I don't get any clear indication from the server console that there is a problem and have to guess what the issue is. At best, the message that the config file is reloaded doesn't appear which may suggest there is an issue, or it may just take time to reload the configuration. Also, if there is an error, this seems to break the config reload and I can't get back to a working version without restarting the server. Since these files can be very complicated it's proving very slow going to build a working configuration. If anyone has a developed set of world and mob files that would be great - the plugin is very versatile but has only a very sparse default set. Thanks in advance.
@Schlutteh
Sweet! Thanks so much! I'll check it out to see if it works.
@Meswrex
It seems to be "mutated"... who would have guessed that?! There's just no guessing some of the Bukkit names/values for things.
See: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/block/Biome.html
Hi there, Just trying to track down an updated list for the biome values. The link to internal documentation referenced here http://wiki.sylian.eu/spawns/string-conditions (documentation for making config files) is broken now. I tried finding values by going back over the forum posts but the last partial list I can see is very old (https://dev.bukkit.org/bukkit-plugins/spawns/?page=55#c36). The particular issue I am having is with the biome variation name 'M' for those biomes that have this. This either doesn't seem to be accommodated in the current version of the plugin, or I don't have the correct value. The vanilla values like desert, plains, etc. all work as expected and mobs spawn correctly when restricted with these values, but moving the player to an 'M' region, such as Desert M breaks the spawns, so the vanila value can't be used. I've tried adding variations such as desert m, Desert M, desert_m, Desert_M. Pretty much guessing without a value table. Haven't dared to try dealing with a value like Extreme Hills+! Anyone have the current value list?
Has horse speed been added to the Bukkit/Spigot API yet?
I think it's the only thing that horses are missing now.
@coldandtired
They work wonderfully, thank you so much!
@JMTyler
I've rebuilt Mobs and EE for 1.10. Give them a try and see if they work as before.
@coldandtired
I think the API has actually changed in the latest 1.10 release... have you tested Mobs and ExtraEvents on that version? They're both throwing exceptions for me on boot.
From what I can tell, it looks like Bukkit.getOnlinePlayers() has been deprecated for a long time and has finally been removed completely.
Could you make an example file how to create mobs and that? Because I don't think it's enough with the wiki I mean just a file located in the folder or a file we can download
@coldandtired
I was using both the baby and locked age -1000 conditions, I thought it might be conflicting so I tried just locked age, unfortunately they still insta-grow. It's not a huge problem, I just replace them with something else.
I'm getting a lot of errors in 1.10 too, one seems to be having a problem with the changes to vanilla villager "professions" - java.lang.IllegalArgumentException: Profession is reserved for Zombies: (insert type) even though I'm not spawning custom zombies, but I am spawning villagers so maybe that's the conflict.
Couldn't see any polar bear spawns, but I haven't done much testing on that yet. They working ok for you?
Despite the errors all my old spawns seem to still work fine!
@Schlutteh B3 adds the polar_bear mob.
There is a property called locked-age which should do what you want. It takes the age you want the mob to stay at.
@Schlutteh I'm looking into both of these tomorrow morning, maybe tonight if I get back early enough.
Are polar bears not added yet? Spawns had a fit when I tried to spawn a baby "polar_bear" (guessing the name, couldn't find it on the wiki)
Unless it's something like mob: "Bear" type: "polar" ?
I rediscovered an old problem you might be able to help me with; when I spawn baby sheep they instantly mature the second they "eat" grass (even with mobGriefing off).
I had them spawn as baby and with age -1000 but they still insta-grow to adult when they eat grass.
@JMTyler It's not quite that way. Spawns has to do some stuff that Bukkit doesn't support so it breaks every update. Most plugins don't so as long as the API doesn't change (which it hasn't for a long time, AFAIR) they don't need to be updated.
Spawns puts mobs into the world and then Mobs handles later stuff. Events is sort of a less-powerful combination of both of them. I have a better version in the works, which will work on both Sponge and CraftBukkit/Spigot but it's slow-going :(
Is this essentially the new "Mobs"? And is "Events" essentially the new "Extra Events"?
Great to see that you're still building & updating on 1.10! I was very discouraged to see your other plugins (and in fact, most devs' plugins on here) still sitting at 1.7.x or lower. If these are essentially replacements for those old plugins, maybe consider updating their descriptions to make these easier to find?