2017-05-15 02:05:01 +08:00
|
|
|
From 0b2c23e0f9ef9496c70ffc151913ad91f1fd1cfe Mon Sep 17 00:00:00 2001
|
2016-03-19 02:20:11 +08: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
|
2017-03-25 11:18:58 +08:00
|
|
|
index 9987a5c7a..0873febb6 100644
|
2016-03-19 02:20:11 +08:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2017-03-25 11:18:58 +08:00
|
|
|
@@ -249,4 +249,9 @@ public class PaperWorldConfig {
|
2016-07-17 09:10:43 +08:00
|
|
|
private void nonPlayerEntitiesOnScoreboards() {
|
|
|
|
nonPlayerEntitiesOnScoreboards = getBoolean("allow-non-player-entities-on-scoreboards", false);
|
2016-03-19 02:20:11 +08:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean allowLeashingUndeadHorse = false;
|
|
|
|
+ private void allowLeashingUndeadHorse() {
|
|
|
|
+ allowLeashingUndeadHorse = getBoolean("allow-leashing-undead-horse", false);
|
|
|
|
+ }
|
|
|
|
}
|
2016-11-17 10:23:38 +08:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityHorseAbstract.java b/src/main/java/net/minecraft/server/EntityHorseAbstract.java
|
2017-05-15 02:05:01 +08:00
|
|
|
index bed01b8c0..a3c41130f 100644
|
2016-11-17 10:23:38 +08:00
|
|
|
--- 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
|
2016-03-19 02:20:11 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
public boolean a(EntityHuman entityhuman) {
|
2016-11-17 10:23:38 +08:00
|
|
|
- return super.a(entityhuman) && this.getMonsterType() != EnumMonsterType.UNDEAD;
|
|
|
|
+ return world.paperConfig.allowLeashingUndeadHorse ? super.a(entityhuman) : super.a(entityhuman) && this.getMonsterType() != EnumMonsterType.UNDEAD; // Paper
|
2016-03-19 02:20:11 +08:00
|
|
|
}
|
|
|
|
|
2017-05-15 02:05:01 +08:00
|
|
|
protected void s(float f) {
|
2016-03-19 02:20:11 +08:00
|
|
|
--
|
2017-05-15 02:05:01 +08:00
|
|
|
2.13.0
|
2016-03-19 02:20:11 +08:00
|
|
|
|