NaturalHorses
Naturally spawning horses - The way you want it!
With the introduction of horses in Minecraft 1.6, horses may now spawn naturally in plains biomes. Although for most people, it is often extremely rare (at least in old chunks). This plugin tries to emulate the natural spawning of horses and allows you to configure when and how it happens.
How does it work?
When the server loads a chunk into memory, the plugin performs various checks to determine if horses should be spawned (simulating a natural spawn). You are able to choose where they spawn, how often and how many in each group/herd.
Features:
- Ignores ALL newly generated chunks (assumes 1.6 chunk generation will handle it).
- The whole chunk must be Plains biome (actually only all four corners are checked, for performance).
- Surrounding chunks must contain no living entities (configurable chunk radius).
- Horses/donkeys will only spawn on grass blocks
- Time delay between spawning anything in seconds (configurable)
- Random chance of spawning anything (configurable)
- Random chance of spawning donkey instead of horse (configurable)
- Choose how many horses can spawn per group/herd
- WorldGuard compatible (does not spawn in regions with "mob-spawning: deny")
- Lots of debug information! (can be disabled)
How to use it:
- Download the NaturalHorses.jar
- Put the file in your "plugins" folder on your server.
- Restart your server
- Make any changes to the "plugin/NaturalHorses/config.yml" config file
- Restart your server again
- Find horses! :)
Please see the configuration page for more info.
Dev Builds:
Development builds can be acquired at the provided continuous integration server.
These builds have not been approved by the BukkitDev staff. Use them at your own risk.
See this in action?
You can try out this plugin on our family friendly survival server:
I get this error when I HAVE WorldGuard...
[SEVERE] Error occurred while enabling NaturalHorses v1.0.1 (Is it up to date?) java.lang.NullPointerException at com.sk89q.worldguard.bukkit.WorldConfiguration.getBoolean(WorldConfiguration.java:200) at com.sk89q.worldguard.bukkit.WorldConfiguration.loadConfiguration(WorldConfiguration.java:302) at com.sk89q.worldguard.bukkit.WorldConfiguration.<init>(WorldConfiguration.java:192) at com.sk89q.worldguard.bukkit.ConfigurationManager.get(ConfigurationManager.java:202) at com.sk89q.worldguard.bukkit.WorldGuardPlugin.getRegionManager(WorldGuardPlugin.java:828) at au.com.addstar.naturalhorses.NaturalHorses.onEnable(NaturalHorses.java:54) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217) at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:457) at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381) at org.bukkit.craftbukkit.v1_6_R1.CraftServer.loadPlugin(CraftServer.java:282) at org.bukkit.craftbukkit.v1_6_R1.CraftServer.enablePlugins(CraftServer.java:264) at net.minecraft.server.v1_6_R1.MinecraftServer.l(MinecraftServer.java:313) at net.minecraft.server.v1_6_R1.MinecraftServer.f(MinecraftServer.java:290) at net.minecraft.server.v1_6_R1.MinecraftServer.a(MinecraftServer.java:250) at net.minecraft.server.v1_6_R1.DedicatedServer.init(DedicatedServer.java:151) at net.minecraft.server.v1_6_R1.MinecraftServer.run(MinecraftServer.java:391) at net.minecraft.server.v1_6_R1.ThreadServerApplication.run(SourceFile:582)
@MetalGearDaner
Yes, sorry this is a bug in the 1.0.0 version. It only happens when you don't have WorldGuard. I have fixed it in v1.0.1 which is waiting for Bukkit approval and should be up soon.
I have this error, any idea?
[NaturalHorses] Enabling NaturalHorses v1.0.0 [SEVERE] Error occurred while enabling NaturalHorses v1.0.0 (Is it up to date?) java.lang.NullPointerException at com.sk89q.worldguard.bukkit.ConfigurationManager.get(ConfigurationManager.java:196) at com.sk89q.worldguard.bukkit.WorldGuardPlugin.getRegionManager(WorldGuardPlugin.java:828) at au.com.addstar.naturalhorses.NaturalHorses.onEnable(NaturalHorses.java:54) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217) at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:457) at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381) at org.bukkit.craftbukkit.v1_6_R1.CraftServer.loadPlugin(CraftServer.java:282) at org.bukkit.craftbukkit.v1_6_R1.CraftServer.enablePlugins(CraftServer.java:264) at net.minecraft.server.v1_6_R1.MinecraftServer.l(MinecraftServer.java:313) at net.minecraft.server.v1_6_R1.MinecraftServer.f(MinecraftServer.java:290) at net.minecraft.server.v1_6_R1.MinecraftServer.a(MinecraftServer.java:250) at net.minecraft.server.v1_6_R1.DedicatedServer.init(DedicatedServer.java:151) at net.minecraft.server.v1_6_R1.MinecraftServer.run(MinecraftServer.java:391) at net.minecraft.server.v1_6_R1.ThreadServerApplication.run(SourceFile:582)
@x_clucky
That's very strange. The plugin will never spawn a horse while players are standing in the area (AFK'ing is useless). Horses are only spawned when the chunk is loaded, which only happens when a player moves into chunks that were not loaded into server memory.
Also, there is already a configurable "chunk-check-radius" (see Features section above). It will check the surrounding X chunks and will refuse to spawn anything if there are any living entities in any of those chunks. The default settings work perfectly well on my own server and horses seem to be rare enough. The config file should be fairly self explanatory.
I suggest enabled debug mode and observing the results in console. Also make sure the chunks are not newly generated 1.6 chunks because horses will naturally spawn in those areas anyway.
This plugin is creating WAY too many horses. In only one field, I found 43 horses/donkeys... Lowering the percentage will not help, as players will just AFK in the area longer. My request is this: upon spawning horses, check a configurable radius to make sure there aren't above a configurable amount of horses, and if there are more than that, cancel the spawn.
@vxnick
No problem. Sorry I didn't test it properly last time. But I have tried it (the new version) on my test server without WorldGuard loaded and it worked fine with no errors (and it spawned horses).
@add5tar
Excellent, thanks!
@vxnick
Sorry, I just found the problem and have uploaded v1.0.1 which will fix this problem. It will be available when it's approved by Bukkit.
@vxnick
Yes, it's meant to be! Sorry about that. Can you send me a pastebin link of the full output (including traceback)?
I get this a lot in the console, and it doesn't seem to be spawning any horses:
I thought WorldGuard was optional?
@NuclearSnowman
It absolutely works fine on my own server. Hundreds of players have already found horses and we have a fully pre-generated world, so no new 1.6 chunks have been generated.
Remember to edit the config.yml and set the "horse-world" option to the name of the world you want horses to spawn in.
Did you follow the "How to use it" instructions above?
@NuclearSnowman
Horse API was added into a craftbukkit developmental build already, therefore, I do not see any reason why this plugin wouldn't work.
Also, it loads perfectly fine without any errors:
Can anyone confirm this works? I dont believe it is working on bukkit but I dont have any idea how to install it in any other way.
Horses ignore Multiverse. The comments on Multiverse show that myself and several others noticed this.
@x_clucky
I will check and let you know, but currently it only works for a single world anyway (specified in config). I will be adding multiple worlds soon. In the config, enter the world you want the horse spawning to occur in.
If I have animal spawning turned off in a world (using multiverse) will it prevent horses from spawning? If not, could you hook into multiverse or add multi-world compatability?
This is exactly what I was looking for after updating today. Hopefully Bukkit will approve this soon. :)
@TowelieDOH
This is also due to the fact that horses aren't fully built into bukkit right now.
@add5tar
I've noticed that horses are laggy in multiplayer on bigger servers (with 50+ players). Is there a way to somehow fix/reduce that lag by perhaps slowing the horses down?
It would be a pretty sweet plugin feature if that was possible.
I am very new with mods in this format. Can you please explain to me how this would be applied? The readme file is empty.