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 Jan 7, 2014Ok this is what I get:
[Server thread/WARN]: [spawns] Task #3514 for spawns v1.7.2 b2 generated an exception
java.lang.NullPointerException
at eu.sylian.conditions.Condition.matches(Condition.java:345) ~[?:?]
at eu.sylian.conditions.Condition.passes(Condition.java:194) ~[?:?]
at eu.sylian.conditions.ConditionGroup.passesAllConditions(ConditionGroup.java:56) ~[?:?]
at eu.sylian.spawns.Mob.canSpawnHere(Mob.java:761) ~[?:?]
at eu.sylian.spawns.Pack.getMobToSpawn(Pack.java:79) ~[?:?]
at eu.sylian.spawns.WorldHandler.getSpawnBlocks(WorldHandler.java:312) ~[?:?]
at eu.sylian.spawns.WorldHandler.run(WorldHandler.java:215) ~[?:?]
at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftTask.run(CraftTask.java:53) ~[minecraft_server.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345) [minecraft_server.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:587) [minecraft_server.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:250) [minecraft_server.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:545) [minecraft_server.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:457) [minecraft_server.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [minecraft_server.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
Sorry I couldn't figure out how to spoiler that info!
-
View User Profile
-
Send Message
Posted Jan 7, 2014@Schlutteh Can you post the full log with the error so I can see what's causing it?
-
View User Profile
-
Send Message
Posted Jan 6, 2014@Schlutteh
Same here. The plugin simply doesn't seem to be working with that version of Bukkit - although it does seem like some things are happening, such as the increased mob limit.
-
View User Profile
-
Send Message
Posted Jan 5, 2014Edit: Anyone else getting a Null Pointer Exception in Bukkit beta R0.2 (#2974)?
Spawns seems to have stopped working for me, I'm not sure what to do.
-
View User Profile
-
Send Message
Posted Jan 1, 2014I mean a mob that I have created within the Spawns so if, for example I have a zombie called Lvl1Zombie, i want to be able to limit them to just 6 mobs in the world, would that be possible?
Thanks
Shaythegoon
EDIT: It also appears that the dies.txt is not working (is not being used) by the plugin. I have this in there and it does not work when the mob is killed:
EDIT 2: Happy New Year!
-
View User Profile
-
Send Message
Posted Dec 31, 2013@shaythegoon You can limit the mob by type (e.g. have no more than x zombies in the world at once). Do you mean this or an exact individual mob?
-
View User Profile
-
Send Message
Posted Dec 31, 2013@Schlutteh It looks like that mob is just another hack (like spider jockeys) so there currently isn't any way to target them specifically. I'll add the ability to link the rider and vehicle together though,
-
View User Profile
-
Send Message
Posted Dec 31, 2013It also be cool if we could limit the amount of a custom mob spawning with an extra condition in the spawn-if tags...
Thanks
Shaythegoon
-
View User Profile
-
Send Message
Posted Dec 30, 2013I'm using MobHealth to show the players the Mobs health, but it comes with an output on the console that I have never seen before... This is what it says:
[Mobs] config = §fLVL 2 ZOMBIE§r§f§r: [§a||||||§c||||||§f], needed = Lvl 2 Zombie
Also; I'm still not able to get zombies to drop Iron Ingots using this in the "Dies.txt" file in mobs:
And this in the "Mobs.xml in spawns:
The zombies spawn and nothing is dropped when they are killed...
UPDATE: After a bit of trial and error, and using the Broadcast as a Debug I got my models to work, if you want to see them and add them as examples, then just ask. I'd happily put some thing useful back into Spawns and Mobs for other people to use :D
Thanks Shaythegoon
-
View User Profile
-
Send Message
Posted Dec 28, 2013Now that zombie lag has been "reduced" (apparently), I'm considering allowing them to spawn again on my server. But I have one concern: chicken-jockeys. http://minecraft.gamepedia.com/Chicken_Jockey
Is there a way for us to allow them to spawn but make the chicken despawn with the baby zombie?
I suppose this issue will have to wait for a Bukkit 1.7.4 release before we can figure out what to do, I just realized it's not a 1.7.2 feature.
-
View User Profile
-
Send Message
Posted Dec 26, 20131.7.2 b2 is just an update to the 2nd Beta build. I've been working hard on updates but decided to roll them back for now as the beta is out.
-
View User Profile
-
Send Message
Posted Dec 16, 2013@Mavhill You can use Mobs to do this. I will try to add it to Spawns if it doesn't cause too much of a performance hit.
-
View User Profile
-
Send Message
Posted Dec 16, 2013@Schlutteh \o/
One fewer thing to worry about :)
-
View User Profile
-
Send Message
Posted Dec 15, 2013Anyway to add worldguard regions so you could block certain mobs spawning in certain wg regions?
-
View User Profile
-
Send Message
Posted Dec 12, 2013@coldandtired
After a couple Bukkit updates, the blocked zombies stopped spawning, so yeah it was just a Bukkit glitch after all. Running great now (Bukkit #2953).
-
View User Profile
-
Send Message
Posted Dec 10, 2013@coldandtired
I have seen Zombies, Skeletons and horses spawning half inside blocks.
-
View User Profile
-
Send Message
Posted Dec 10, 2013I only knew about (cave)spiders spawning inside blocks so that was fixed already. I can easily do the same thing for iron golems.
Blocked or allowed everything is already pretty much ready but needs a bit more polishing.
The zombie thing might be Bukkit-related as I can't remember changing any of that code for a while. There are multiple Bukkit bug fixes every day (some of which break something else) so it will take a while to get stable.
-
View User Profile
-
Send Message
Posted Dec 10, 2013I sometimes get mobs (mostly iron golems) spawning halfway inside solid blocks too, but it really doesn't worry me. This plugin allows us to spawn mobs under conditions that would normally be blocked by the vanilla mechanics, so I guess it's just part of that. Meh, not worried.
Now that we have a 1.7 version, are you still planning to add a blocked-biomes condition? So that we can specify which biomes each mob is not allowed to spawn in, now that there are so many different biomes (including variants).
No hurry though, Bukkit is gonna take awhile to get a Beta or RB finished.
-
View User Profile
-
Send Message
Posted Dec 8, 2013Any fix in sight for mobs spawning with half their body inside blocks and therefor dying?
-
View User Profile
-
Send Message
Posted Dec 8, 2013Thanks for updating so quickly! I have run 1.7.2 for a couple hours, with Spawns, mcMMO, and Lockette; RAM usage is low / CPU usage is low, my custom spawns are working, only minor glitch is that sometimes zombies are spawning even though they are not on my allowed-default-spawns or spawning outside of conditions I have set. Probably a Bukkit problem though.
I read that zombies don't cause as much server lag now, but with their advanced pathfinding and target range, I think I'll still keep them confined. Zombies are meant to be slow and stupid!