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 Dec 5, 2013@coldandtired
Good to know! keep this updated and i may have to send some more donations your way. i like to help the plugin devs that help me and my server. so thank you for making my server possible! :)
-
View User Profile
-
Send Message
Posted Dec 5, 2013@zachrywilsn I wouldn't worry about that error. I had my own code for creating the default config files but then I noticed that there is a built in method for doing it. Unfortunately it produces those warnings for some reason :(
I have a few more features I'm working on now, so hopefully I'll get those finished before a 1.7.2 Beta build is out.
-
View User Profile
-
Send Message
Posted Dec 4, 2013@coldandtired
Thanks for the amazing work! this plug has made my players have more team based zombie fights and a lil less pvp. i like it that way. an i thank you again for your work.
may want to look into this works. but i get this error on start up and when i do /rs
http://pastebin.com/Z5SRqi3N
-
View User Profile
-
Send Message
Posted Dec 4, 2013@zachrywilsn You can find a link on the main tutorial site or wait for Bukkit to approve it. We're not allowed to post links directly here :(
-
View User Profile
-
Send Message
Posted Dec 4, 2013@coldandtired
when or where can i find this? or do i have to wait till bukkit approves?
-
View User Profile
-
Send Message
Posted Dec 4, 2013@zachrywilsn All done! It seemed to run a bit smoother than 1.6.4 on my machine but the dev build likely has a few problems left to solve. I'll update it again in a few days with whatever the latest dev build is then.
And many thanks for your previous donation <3
-
View User Profile
-
Send Message
Posted Dec 3, 2013when this goes into 1.7.2 - i got another donation for yah! :)
-
View User Profile
-
Send Message
Posted Nov 27, 2013@zachrywilsn
Name them with a nametag, or breed them and the offspring will persist. It wouldn't be a good idea to keep spawning mobs that don't despawn as they would eventually overwhelm your server and crash it. That's why C&T added the <despawn/> element, for managing numbers of spawned persistent mobs.
Alternately (if you have no nametags), you can use Mob Catcher to egg+release mobs, this clears their attributes.
-
View User Profile
-
Send Message
Posted Nov 27, 2013Question? is there a way to make some mobs not despawn? like so players can have farms?
-
View User Profile
-
Send Message
Posted Nov 25, 2013Ok here's the thing.. I have set up many spawns and they are working like a charm, got everything to work as I wanted to but, I have noticed quite some lag when viewing chests. I did some examines with nolagg to see what was up and spawns was listing at 250ms so I increased the tickrate from 15 to 50 to test more, on the next examine spawns was on 85ms which is fine but I still had that annoying 1sec delay on opening chest sometimes..
I tested and tested and finally when I disabled the entire spawns plugin the lag was gone. The server was not using any amount of cpu or ram noticeable and the TPS constantly was at 20.0, yet this lag is created from what spawns is doing.
No errors in console.
Thought I'd let you know. Hope this information helps somehow.
EDIT: This was measured when I constantly was opening chests. When I wait a few seconds in between opening its not that bad.
-
View User Profile
-
Send Message
Posted Nov 23, 2013@zachrywilsn
For something like that, you might want to try C&T's plugin "Mobs". I just use Spawns so I don't know a lot about it but it may help you.
In Spawns though, you could add <blocked-mobs>chicken<blocked-mobs> to your config.xml to restrict them from being spawned at all, it would mean no more raw chicken but it would make your existing stock of "knives" so much more valuable!
-
View User Profile
-
Send Message
Posted Nov 23, 2013@Schlutteh
any way to make chicken drop only meat and not the feather? i use a feather for a knife on my server. lol
-
View User Profile
-
Send Message
Posted Nov 21, 2013<<reply 1877324>>
@Zachrywilsn
No idea why I didn't think of this sooner, possibly because I haven't used potion effects, but you CAN have stronger zombies without weapons! I blame C&T for not correcting me! ;)
Replace the weapon section (or add this below if you want both) with this:
<potion-group>
<potion>increase_damage
<duration>180</duration>
<level>2</level>
</potion>
</potion_group>
-
View User Profile
-
Send Message
Posted Nov 21, 2013@coldandtired
Wow, really nice job on b8. All enchanting works like a charm!! :)
-
View User Profile
-
Send Message
Posted Nov 21, 20131.6.4 b8 is up (at the usual place).
It's now possible to add names, lore, and enchantments to equipment. The tutorial is already updated so read the equipment section on the glossary page for examples and usage.
-
View User Profile
-
Send Message
Posted Nov 21, 2013@Treijim To be honest, I have no idea :) I just scanned the docs and added options to change it. I think it works out to the number of days a mob has been alive but I could be wrong.
Currently you can't block sub mobs from spawning. I'll add it to the next release but you can use Mobs to do it if you need it urgently.
-
View User Profile
-
Send Message
Posted Nov 21, 2013@Schlutteh
lol nice troll :) - an many thanks honestly! i seen that and was like omg colored sheep, really? Thanks so much!
-
View User Profile
-
Send Message
Posted Nov 20, 2013@zachrywilsn
Awww, I thought it was funny. Well, just remove this section from the sheep in the mobs.xml
<color>random<color/>
And make sure you don't leave a gap where it was.
-
View User Profile
-
Send Message
Posted Nov 20, 2013How does the age function work? What's the value, and what do numbers equate to? In other words, how do I ensure that no child hostile mobs spawn?
EDIT: And how do I prevent villager zombies from spawning? I see a function to turn a zombie into a villager zombie, but nothing else.
-
View User Profile
-
Send Message
Posted Nov 20, 2013@Schlutteh
all working great. im impressed with this plugin. now can i get my sheep to not come out colored. like i have random blue,green, etc sheep. kinda not cool, lol