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 19, 2014Sorry Cold, I was working on my server and fell asleep whilst at the Keyboard xD
Here are my files anyways:
thanks :D
-
View User Profile
-
Send Message
Posted May 19, 2014@coldandtired
Hi there!
I'm wondering is this setup will allow zombies to spawn during the day? And also does the dev build work with 1.7.9?
Config.xml | Packs.xml | Mobs.xml
Thanx in advance
-
View User Profile
-
Send Message
Posted May 18, 2014@shaythegoon Sure. Send/paste it and I'll have a look in the morning.
I was doing some tests earlier with a very simple config and mobs were spawning as expected so something is up somewhere.
-
View User Profile
-
Send Message
Posted May 18, 2014@coldandtired
Nope, no mobs are spawning at all. Do you want my whole config?
Shaythegoon
-
View User Profile
-
Send Message
Posted May 18, 2014@Zoagel Each world that has the plugin active needs to have a config file defined. No valid worlds means that no world config files could be found, or that they contained errors serious enough to stop the plugin working.
Check out the wiki for instructions on how to define a world file.
-
View User Profile
-
Send Message
Posted May 18, 2014Hi, I encountered a problem.
How does the plugin search for worlds/what's a ''valid'' world?
I use the most recent 1.7.9 bukkit dev build, and spawns 1.7.9 b3.
My world is a normal world, normal world generation and everything. The name is just ''world''.
I tried creating a fresh server with spawns, generating a whole new world. Din't work.
How do i fix this? Thanks in advance :)
-
View User Profile
-
Send Message
Posted May 18, 2014@shaythegoon What I would expect to happen base don your config is this:
Every second, one player is randomly selected as as you have only one hub defined and the hub range is 0 (you don't need the hub-y-range if you're happy with XYZ being the same range) the block of the player's feet is chosen to spawn packs around.
Pack-attempts is 1 so one pack will be selected per second maximum. You don't need the timer-has-spawned condition inside select-if as at this point no packs have been chosen and only one is allowed anyway.
Actually, before I go on, are you getting more than 4 mobs spawning around each player?
-
View User Profile
-
Send Message
Posted May 17, 2014Is there any reason this isn't working as expected. Was hoping this would spawn four mobs, then move on to the next run. For a different player. This means that each player can have four mobs around them. Hopefully.
http://pastie.org/9185542
Thanks
Shaythegoon
-
View User Profile
-
Send Message
Posted May 17, 2014Thank you again :D
shaythegoon
-
View User Profile
-
Send Message
Posted May 17, 2014Fixed. The version from 45 minutes ago has been removed and the new one replaced it.
-
View User Profile
-
Send Message
Posted May 17, 2014@shaythegoon I'm fixing it now. It's the per-player condition attribute when the server is empty. I used to have the timers not run at all when there where no players but it looks like I changed it for some reason.
-
View User Profile
-
Send Message
Posted May 17, 2014Still getting the Divide by Zero error. Is it the way I have config'd the Mobs/ServerWorld file. Or is it just a plugin mishap.
http://pastie.org/9184764 <- The Error
http://pastie.org/9184768 <- The World.xml
http://pastie.org/9184772 <- The Mobs.xml
Sorry about this;
Shaythegoon
-
View User Profile
-
Send Message
Posted May 17, 2014Oh! Thanks :D
shaythegoon
-
View User Profile
-
Send Message
Posted May 17, 2014@shaythegoon Your problem :)
The mob selecting conditions were getting skipped so basically all mobs in the pack could spawn everywhere.
-
View User Profile
-
Send Message
Posted May 17, 2014Whats the fix for?
shaythegoon
-
View User Profile
-
Send Message
Posted May 17, 2014@shaythegoon 2 minutes after I upload a fix for the previous thing! :)
I'll add the player count fix tonight. For now, a very important bug fix was added to 1.7.9 b4/1.7.2 b8 regarding the mob select conditions. Updating is critical! Links are on the wiki site if you need them or wait for BukkitDev file approval.
Also added a config option to disable database saving - <use-database>yes|no</use-database> (defaults to yes).
-
View User Profile
-
Send Message
Posted May 17, 2014Getting this error, plugin probably shouldn't be dividing by 0. Its gunna need a lot of Duct Tape to do that. xD
http://pastie.org/9184721
Shaythegoon
-
View User Profile
-
Send Message
Posted May 16, 2014No error logs, which is weird and the mobs are spawning, just in the wrong place...
Shaythegoon
-
View User Profile
-
Send Message
Posted May 16, 2014@johndcastro I will be adding it to the next update, although the database is going to be used much more in the near future.
If only Minecraft metadata persistence was better! :(
-
View User Profile
-
Send Message
Posted May 16, 2014@coldandtired
One more question cold, is there a way to disable adding mobs to the database all together if we do not plan on using the mob-id and such features?