2016-03-22 01:46:54 +01:00
|
|
|
From 402c065f538cc171d8aa3dc58c92194b4c8ded70 Mon Sep 17 00:00:00 2001
|
2016-03-18 19:20:11 +01: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-03-19 03:10:20 +01:00
|
|
|
index 854607a..b5ed53f 100644
|
2016-03-18 19:20:11 +01:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2016-03-19 03:10:20 +01:00
|
|
|
@@ -287,4 +287,9 @@ public class PaperWorldConfig {
|
2016-03-18 19:20:11 +01: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
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
|
|
|
--
|
2016-03-22 01:46:54 +01:00
|
|
|
2.7.4
|
2016-03-18 19:20:11 +01:00
|
|
|
|