aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches/0073-Undead-horse-leashing.patch
diff options
context:
space:
mode:
Diffstat (limited to 'Spigot-Server-Patches/0073-Undead-horse-leashing.patch')
-rw-r--r--Spigot-Server-Patches/0073-Undead-horse-leashing.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0073-Undead-horse-leashing.patch b/Spigot-Server-Patches/0073-Undead-horse-leashing.patch
new file mode 100644
index 0000000000..c087c3c8d9
--- /dev/null
+++ b/Spigot-Server-Patches/0073-Undead-horse-leashing.patch
@@ -0,0 +1,37 @@
+From 8995c864c37aa0d3ea38ec7ea12313130b8f7dae Mon Sep 17 00:00:00 2001
+From: Aikar <[email protected]>
+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 9987a5c7a..0873febb6 100644
+--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+@@ -249,4 +249,9 @@ public class PaperWorldConfig {
+ private void nonPlayerEntitiesOnScoreboards() {
+ nonPlayerEntitiesOnScoreboards = getBoolean("allow-non-player-entities-on-scoreboards", false);
+ }
++
++ public boolean allowLeashingUndeadHorse = false;
++ private void allowLeashingUndeadHorse() {
++ allowLeashingUndeadHorse = getBoolean("allow-leashing-undead-horse", false);
++ }
+ }
+diff --git a/src/main/java/net/minecraft/server/EntityHorseAbstract.java b/src/main/java/net/minecraft/server/EntityHorseAbstract.java
+index d74ccd68d..3416c7a7d 100644
+--- a/src/main/java/net/minecraft/server/EntityHorseAbstract.java
++++ b/src/main/java/net/minecraft/server/EntityHorseAbstract.java
+@@ -115,7 +115,7 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven
+ }
+
+ public boolean a(EntityHuman entityhuman) {
+- return super.a(entityhuman) && this.getMonsterType() != EnumMonsterType.UNDEAD;
++ return world.paperConfig.allowLeashingUndeadHorse ? super.a(entityhuman) : super.a(entityhuman) && this.getMonsterType() != EnumMonsterType.UNDEAD; // Paper
+ }
+
+ protected void q(float f) {
+--
+2.12.0.windows.1
+