diff --git a/CraftBukkit-Patches/0151-Allow-undead-horse-types-to-be-leashed.patch b/CraftBukkit-Patches/0151-Allow-undead-horse-types-to-be-leashed.patch new file mode 100644 index 0000000000..b22cbaf2ad --- /dev/null +++ b/CraftBukkit-Patches/0151-Allow-undead-horse-types-to-be-leashed.patch @@ -0,0 +1,55 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Zach Brown <1254957+zachbr@users.noreply.github.com> +Date: Sat, 17 May 2014 00:18:54 -0500 +Subject: [PATCH] Allow undead horse types to be leashed + + +diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/server/EntityHorse.java ++++ b/src/main/java/net/minecraft/server/EntityHorse.java +@@ -0,0 +0,0 @@ import org.bukkit.event.entity.EntityDamageEvent; + import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason; + // CraftBukkit end + ++// PaperSpigot start ++import org.spigotmc.SpigotWorldConfig; ++// PaperSpigot end ++ + public class EntityHorse extends EntityAnimal implements IInventoryListener { + + private static final IEntitySelector bu = new EntitySelectorHorse(); +@@ -0,0 +0,0 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener { + } + + public boolean bM() { +- return !this.cE() && super.bM(); ++ // PaperSpigot start - Configurable undead horse leashing ++ if (SpigotWorldConfig.allowUndeadHorseLeashing) { ++ return super.bM(); ++ } else { ++ return !this.cE() && super.bM(); ++ } ++ // PaperSpigot end + } + + protected void o(float f) { +diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java ++++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java +@@ -0,0 +0,0 @@ public class SpigotWorldConfig + log( "Allow Zombie Pigmen to spawn from portal blocks: " + enableZombiePigmenPortalSpawns ); + } + ++ public static boolean allowUndeadHorseLeashing; ++ private void allowUndeadHorseLeashing() ++ { ++ allowUndeadHorseLeashing = getBoolean( "allow-undead-horse-leashing", true); ++ log( "Allow undead horse types to be leashed: " + allowUndeadHorseLeashing ); ++ } ++ + public int maxBulkChunk; + private void bulkChunkCount() + { +-- \ No newline at end of file