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 Oct 25, 2013I'm getting the same problem as Schlutteh, I can't get mobs to spawn with armor, i'll check that out in a sec. Doing a full map render Dx
-
View User Profile
-
Send Message
Posted Oct 24, 2013Ah Bukkit, a love/hate relationship.
I just noticed my config/s in the examples page! For anyone wondering, you don't need to have each of your mobs in a separate pack like I do, that's just how I like to set it up. You can add all of your mobs to one pack, or split them up if you want more control over the pack elements.
But I think it's good that people can see some of the more crazy things (and also practical) you can do with this awesome plugin!
-
View User Profile
-
Send Message
Posted Oct 24, 2013@Schlutteh The barding items use underscores not hyphens (e.g. gold_barding). Other than that your example was good.
When I added the equipment stuff I tested with skeletons and everything was working fine. When I tried to do the same thing with horses today the items were being added to the inventory (reading the inventory programmatically confirmed it) but were never showing up on the client and so couldn't be interacted with.
To be honest, the item parts of the Bukkit API have been temperamental for as long as I can remember so it's very possible that what worked is now broken or vice versa. Item/block IDs seem to be on their way out and a lot of the methods have been deprecated or removed recently.
-
View User Profile
-
Send Message
Posted Oct 24, 2013@coldandtired
Sweet! So, usage is: <horse_armor>gold_barding</horse_armor> like that? Can you add it to the doc's when you have time please. Thanks!
Spawning donkeys with chests with items might be useful, but I wouldn't use it on my server anyhow. It wouldn't update to client? Maybe this is why I can never get mobs to spawn with weapons/armor... Whenever I have tried, they either spawn with no weapon or refuse to spawn at all when I try armor. I'll have to try again, haven't tried in several updates now, I'll let you know if I can get that to work now. Does it work ok for you?
-
View User Profile
-
Send Message
Posted Oct 24, 2013@Schlutteh And done - http://dev.bukkit.org/bukkit-plugins/spawns/files/14-1-6-4-b3/
Only horses can wear armour (I think).
It's theoretically possible to set horses to spawn with items in their chests but the client wasn't updating the inventory (possibly this will get fixed later) so I removed it for now.
-
View User Profile
-
Send Message
Posted Oct 23, 2013@coldandtired
Ok cool, following the link you posted, I found this:
http://jd.bukkit.org/dev/apidocs/org/bukkit/inventory/HorseInventory.html
And I had a quick browse through horse-related plugins and found that "HorseSpawn" and "Custom Horses" claim to be spawning horses with equipment.
So, we might see this ability in the near future...?
(Squeee!)
-
View User Profile
-
Send Message
Posted Oct 23, 2013@shaythegoon From what I remember, vanilla Minecraft's pack conditions are simply that the centre pack block is water (for squid) and air for anything else.
For your other thing, as far as I can remember Mobs should pick up on any named mobs (from whatever plugin). I used to have to implement it all myself but named mobs got officially added recently so it should all work fine.
-
View User Profile
-
Send Message
Posted Oct 23, 2013@coldandtired
Okay, thanks for that. I'll try it out
-
View User Profile
-
Send Message
Posted Oct 23, 2013@shaythegoon The pack's conditions are used to find a centre point for the pack. Once this point is found (all the conditions passed) the radius is used to calculate where to spawn the pack's mobs (the ones that pass the mob conditions).
-
View User Profile
-
Send Message
Posted Oct 23, 2013@coldandtired
But its on the pack right? So is it not using the pack radius? (If i spawn a mob in this plugin with name "x" will Mobs (Your other Plugin) use name "x" also?
-
View User Profile
-
Send Message
Posted Oct 23, 2013@shaythegoon Most config values that accept a number (time, ids, co-ordinates, etc.) accept three types of values - a specific number(s), a range of numbers, or a min/max number.
In your case you have used just one number (x = -600, y = 60, z = 1245) as a condition, which means the condition will only be true (and the mob can spawn) if x is exactly -600, y is exactly 60, and z is exactly 1245. This is possible but highly unlikely so you will see no zombies spawn.
Change the conditions to one of the other types (x = -600 to -400, x = below 0, etc.) and it should work.
The only exception to this is the success-rate condition which reads 50 as a 50% chance (which is really a range of 1 to 50).
-
View User Profile
-
Send Message
Posted Oct 23, 2013@Schlutteh I don't really play Minecraft so I have to go with what I can read form the code. The horse API can be seen here and makes no mention of saddles (unlike the pig API).
Have you tried equipping a saddle like armour?
If you find a plugin that's definitely doing it let me know and I'll see how it's done.
-
View User Profile
-
Send Message
Posted Oct 23, 2013Hello,
Sorry to be a nuisance with both of you plugins. But this doesn't seem to be working. (We removed NBTEditor and decided to use Spawns instead)
Config
<world> <name>ServerWorld</name> <spawn-cycle> <cycle-interval>100</cycle-interval> <chunk-radius>8</chunk-radius> <unique-chunks-only/> <active-packs>lvl1zomsspawn1</active-packs> <start-cycle-if> <total-mobs>below 540</total-mobs> </start-cycle-if> </spawn-cycle>
<chunk-generation> <active-packs>mc-chunk-pack</active-packs> <fill-chunk-if> <success-rate>10</success-rate> </fill-chunk-if> </chunk-generation> </world>
Mobs
<zombie> <id>lvl-1-zombie</id> <pack-limit>8</pack-limit> <name>Lvl 1 Zombie</name> <hp>5</hp> <helmet>leather</helmet> <spawn-if> <light>0 to 10</light> <blocks-from-player>above 10</blocks-from-player> <ground-is-solid/> </spawn-if> </zombie>
Packs
<pack> <id>lvl1zomsspawn1</id> <spawn-attempts>12</spawn-attempts> <pack-limit>4 to 8</pack-limit> <pack-radius>10</pack-radius> <single-mob-pack/> <active-mobs>lvl-1-zombie</active-mobs> <use-if> <success-rate>50</success-rate> <block>air</block> <x>-600</x> <y>60</y> <z>1245</z> </use-if> </pack>
Why is this producing no result and no zombies are being spawned?
-
View User Profile
-
Send Message
Posted Oct 21, 2013Mother of god.... with the </tame> condition you can now access the GUI of undead horses... and saddle/ride them! I am now the coolest person on my server, and I thank you.
E: Are you sure it's not possible to spawn horses with saddles equipped? I couldn't figure out how to configure it here, but it looks like some other plugins are spawning horses with saddles/armor etc. (although I haven't confirmed this)
-
View User Profile
-
Send Message
Posted Oct 16, 2013@zachrywilsn The message means an error was detected but caught so it should have no negative effect. Obviously it would be better to have no error at all which is what I'm working on :)
-
View User Profile
-
Send Message
Posted Oct 15, 2013@coldandtired
will the error hurt anything, and i use spigot if that makes a difference. i really, really love this plug. and hope to use it again.
-
View User Profile
-
Send Message
Posted Oct 15, 2013@Schlutteh I really need to update the site - hopefully tomorrow :)
-
View User Profile
-
Send Message
Posted Oct 15, 2013@zachrywilsn This is some debug code that I'm using to try and catch an error that occasionally happens. I thought I had fixed it but it looks like I need to try again :(
-
View User Profile
-
Send Message
Posted Oct 14, 2013why i get this error - [WARNING] [spawns] Error at location 2
-
View User Profile
-
Send Message
Posted Oct 13, 2013@Frofster
Here is one of my early creations:
<witch>
<id>bat-witch</id>
<pack-limit>2</pack-limit>
<riding>bat</riding>
<spawn-if>
<biome>beach, desert, extreme_hills, forest, jungle, plains, swampland, taiga</biome>
<light>0 to 8</light>
<blocks-from-player>above 23</blocks-from-player>
<blocks-from-spawn>above 23</blocks-from-spawn>
<success-rate>20</success-rate>
</spawn-if>
</witch>
PM me if you want to see my full config/s, they haven't been approved by Cold&Tired for the examples page yet.