2016-05-17 02:07:12 +00:00
|
|
|
From ffb0e934efe4e2025f43f2d1eb921462b4760838 Mon Sep 17 00:00:00 2001
|
2016-03-18 18:20:11 +00:00
|
|
|
From: Aikar <aikar@aikar.co>
|
|
|
|
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
|
2016-05-17 02:07:12 +00:00
|
|
|
index 48ea25c..57e1fcf 100644
|
2016-03-18 18:20:11 +00:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2016-05-17 02:07:12 +00:00
|
|
|
@@ -274,4 +274,9 @@ public class PaperWorldConfig {
|
2016-03-18 18:20:11 +00:00
|
|
|
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
|
2016-05-12 02:07:46 +00:00
|
|
|
index 25d788f..dfe1fa5 100644
|
2016-03-18 18:20:11 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityHorse.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityHorse.java
|
2016-05-12 02:07:46 +00:00
|
|
|
@@ -170,6 +170,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener, IJu
|
2016-03-18 18:20:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public boolean a(EntityHuman entityhuman) {
|
|
|
|
+ if (world.paperConfig.allowLeashingUndeadHorse) { return super.a(entityhuman); } // Paper
|
|
|
|
return !this.getType().h() && super.a(entityhuman);
|
|
|
|
}
|
|
|
|
|
|
|
|
--
|
2016-05-12 02:07:46 +00:00
|
|
|
2.8.2
|
2016-03-18 18:20:11 +00:00
|
|
|
|