From 8fea9b93ce2f3ec6b63330267aabc6601a11c391 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 14:20:11 -0400 Subject: [PATCH] Undead horse leashing default false to match vanilla, but option to allow undead horse types to be leashed. --- .../0087-Undead-horse-leashing.patch | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Spigot-Server-Patches/0087-Undead-horse-leashing.patch diff --git a/Spigot-Server-Patches/0087-Undead-horse-leashing.patch b/Spigot-Server-Patches/0087-Undead-horse-leashing.patch new file mode 100644 index 000000000..3889627ab --- /dev/null +++ b/Spigot-Server-Patches/0087-Undead-horse-leashing.patch @@ -0,0 +1,36 @@ +From 995fdcf36842e733b9e019c1e4e394522fcc7468 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Fri, 18 Mar 2016 14:19:19 -0400 +Subject: [PATCH] Undead horse leashing + +default false to match vanilla, but option to allow undead horse types to be leashed. + +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index 56e513e..4474104 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -279,4 +279,9 @@ public class PaperWorldConfig { + private void useHopperCheck() { + useHopperCheck = getBoolean("use-hopper-check", false); + } ++ ++ public boolean allowLeashingUndeadHorse = false; ++ private void allowLeashingUndeadHorse() { ++ allowLeashingUndeadHorse = getBoolean("allow-leashing-undead-horse", false); ++ } + } +diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java +index ec1e7f6..19532b8 100644 +--- a/src/main/java/net/minecraft/server/EntityHorse.java ++++ b/src/main/java/net/minecraft/server/EntityHorse.java +@@ -167,6 +167,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener, IJu + } + + public boolean a(EntityHuman entityhuman) { ++ if (world.paperConfig.allowLeashingUndeadHorse) { return super.a(entityhuman); } // Paper + return !this.getType().h() && super.a(entityhuman); + } + +-- +2.7.3 +