2016-08-28 01:41:58 +02:00
|
|
|
From 7279a750c265627cbc2a1fae0b3b55e7ef3dd626 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-08-28 01:41:58 +02:00
|
|
|
index 047fa5f..d136807 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-08-28 01:41:58 +02:00
|
|
|
@@ -264,4 +264,9 @@ public class PaperWorldConfig {
|
2016-07-17 03:10:43 +02:00
|
|
|
private void nonPlayerEntitiesOnScoreboards() {
|
|
|
|
nonPlayerEntitiesOnScoreboards = getBoolean("allow-non-player-entities-on-scoreboards", false);
|
2016-03-18 19:20:11 +01:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ 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-06-09 05:57:14 +02:00
|
|
|
index ef429c1..38c4f61 100644
|
2016-03-18 19:20:11 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityHorse.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityHorse.java
|
2016-06-09 05:57:14 +02:00
|
|
|
@@ -169,6 +169,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener, IJu
|
2016-03-18 19:20:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public boolean a(EntityHuman entityhuman) {
|
|
|
|
+ if (world.paperConfig.allowLeashingUndeadHorse) { return super.a(entityhuman); } // Paper
|
|
|
|
return !this.getType().h() && super.a(entityhuman);
|
|
|
|
}
|
|
|
|
|
|
|
|
--
|
2016-08-28 01:41:58 +02:00
|
|
|
2.9.2.windows.1
|
2016-03-18 19:20:11 +01:00
|
|
|
|