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 Sep 4, 2021Could yuou make this work for 1.17.1?
I got this error:
[13:58:34 INFO]: [spawns] Enabling spawns v1.16.3 b1*
[13:58:34 ERROR]: Error occurred while enabling spawns v1.16.3 b1 (Is it up to date?)
java.lang.NullPointerException: null
at java.util.Objects.requireNonNull(Objects.java:208) ~[?:?]
at java.nio.file.Files.copy(Files.java:3112) ~[?:?]
at eu.sylian.spawns.helpers.FileHelper.CopyResourceFile(FileHelper.java:24) ~[Spawns-1.16+b1.jar:?]
at eu.sylian.spawns.Config.Create(Config.java:42) ~[Spawns-1.16+b1.jar:?]
at eu.sylian.spawns.Spawns.reloadFiles(Spawns.java:106) ~[Spawns-1.16+b1.jar:?]
at eu.sylian.spawns.Spawns.onEnable(Spawns.java:48) ~[Spawns-1.16+b1.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[patched_1.17.1.jar:git-Paper-243]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[patched_1.17.1.jar:git-Paper-243]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500) ~[patched_1.17.1.jar:git-Paper-243]
at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugin(CraftServer.java:535) ~[patched_1.17.1.jar:git-Paper-243]
at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugins(CraftServer.java:449) ~[patched_1.17.1.jar:git-Paper-243]
at net.minecraft.server.MinecraftServer.loadWorld(MinecraftServer.java:725) ~[patched_1.17.1.jar:git-Paper-243]
at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:306) ~[patched_1.17.1.jar:git-Paper-243]
at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1212) ~[patched_1.17.1.jar:git-Paper-243]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[patched_1.17.1.jar:git-Paper-243]
at java.lang.Thread.run(Thread.java:831) [?:?]
[13:58:34 INFO]: [spawns] Disabling spawns v1.16.3 b1
-
View User Profile
-
Send Message
Posted Nov 24, 2020Hello,
Is there a way to make the spawn-conditions 0 for all mobs (from spawners)? So mobs should spawn when light-level 0-15 and on block 'air'.
I want hostile mobs to spawn during daylight and animals to spawn on everyblock instead of only grass...
Im not good at the configs, for some reason i cant get it working. I made a pig inside mobs.xml with saddled and 100hp but still they spawn normal. Even from natural spawning.
-
View User Profile
-
Send Message
Posted Sep 12, 2020Support for 1.16? I really need it for my zombie survival server please update it
-
View User Profile
-
Send Message
Posted Sep 13, 2020In reply to virgatebongo:
I've updated it but I can't guarantee everything works. Make sure to check on a test server.
-
View User Profile
-
Send Message
Posted Jul 2, 2020I want to do something really simple, like increase the spawn-rate of Enderman in the overworld, but I really have no idea how to work this plugin. I had a look at the config stuff and I'm just a bit confused on where to begin.
EDIT: Alright, so I tried editing one of the example files from the page to try and spawn Enderman at a set interval and it's not working currently: https://pastebin.com/TFnXTnPP
I made sure to name the file MineChads.xml (the world folder itself is just called MineChads). When I use the /rs command I get this message:
"There was an error reloading the spawns config files!"
I've gotta be making some kind of dumb mistake somewhere, but I'm not experienced enough to figure this stuff out by myself. If you could help me in any way I'd greatly appreciate it.
-
View User Profile
-
Send Message
Posted Feb 24, 2020It doesn't support 1.15.2...?
-
View User Profile
-
Send Message
Posted Dec 15, 2019Any plan to update this to 1.15? Also, I see the guide on writing config files, but it doesn't really say what the file should be called or where it should go.
-
View User Profile
-
Send Message
Posted Dec 25, 2019In reply to gardejor:
Hi,
I've just uploaded a 1.15 build but Xmas might slow down the verification a little.
The main config file should be called config.xml and go in the spawns/ folder. World files should be in the same folder and named after the world they affect.
-
View User Profile
-
Send Message
Posted Sep 27, 2019Does this work on 1.14.4 !?
-
View User Profile
-
Send Message
Posted Sep 30, 2019In reply to Forge_User_39799389:
Started updating it today. There are a fair few changes between 1.13 and 1.14 so it will take a couple of days.
-
View User Profile
-
Send Message
Posted Sep 9, 2019I hope you're still active on this plugin because it could really helps me on my server.
Unfortunately, i'm not able to make it works.
I've created 2 files : IslandMiaTest.xml and IslandMia.xml (which is my worlds names).
The content is the same because i want the same rules inside both : https://hastebin.com/gugixunufo.xml
And i've created mobs.xml : https://hastebin.com/gofoxaxoco.js
When the plugin starts, i have this error : https://hastebin.com/taxazaveno.md
"No valid worlds defined - stopping"
I don't know what is wrong in my config, i searched accross the wiki but didn't found anything about this error.
-
View User Profile
-
Send Message
Posted Sep 11, 2019In reply to Forge_User_46078887:
I've spent all day getting the dev environment set up so I'll have a look into this tomorrow.
-
View User Profile
-
Send Message
Posted Sep 13, 2019In reply to Forge_User_46078887:
Do the world names match the case of the filenames?
-
View User Profile
-
Send Message
Posted Sep 13, 2019In reply to coldntired:
Thanks for reinstalling dev env for me.
My folders name are : IslandMia and IslandMiaTest
Maybe the world name (i mean inside .dat files) are not the same because I copy them from another map and rename the folders. But i don't know how to edit them and if the issue come from that.
-
View User Profile
-
Send Message
Posted Sep 14, 2019In reply to Forge_User_46078887:
What are you using to have multiple worlds? I haven't done any Minecraft stuff for a while so I'm not sure how it's done now.
-
View User Profile
-
Send Message
Posted Sep 14, 2019In reply to coldntired:
I use Multiverse (https://www.spigotmc.org/resources/multiverse-core.390/) to be able to teleport between worlds and both folders are located at the root of the minecraft server.
Btw, i use spigot 1.13.2 (https://getbukkit.org/get/QMerkBxNGNl3EnQl8gACGfWuJnJtJuWB) to manage my server.
-
View User Profile
-
Send Message
Posted Sep 15, 2019In reply to coldntired:
Duplicated post
-
View User Profile
-
Send Message
Posted Sep 17, 2019In reply to Forge_User_46078887:
I've got it working with Multiverse. The issue is that the docs seemed to have got damaged when I changed hosts so the information about making a config is pretty sparse.
Your config won't work as is - the hub and pack need a name. So inside <hubs> should be a <hub> element, and inside <packs> a <pack> one. They can be called whatever you want.
The other problem with your config is the interval. 1 is far too small (I think it means 1 tick, so when I tested it the server was instantly bombarded zombies).
I'll upload it now and start cleaning up the docs.
-
View User Profile
-
Send Message
Posted Sep 17, 2019In reply to coldntired:
I tried with that config : https://pastebin.com/q4XsRLVL
But i still have the same issue
Is there a way to check if my config could works for spawns ?
-
View User Profile
-
Send Message
Posted Sep 18, 2019In reply to Forge_User_46078887:
The error means the plugin couldn't find any matching worlds. Can you run the command mv list and post the result?