2014-11-28 01:17:45 +00:00
|
|
|
From c09702cef82655997b7ace1787a8ee295b1f7211 Mon Sep 17 00:00:00 2001
|
2014-06-22 20:26:31 +00:00
|
|
|
From: Zach Brown <Zbob750@live.com>
|
2014-11-28 01:17:45 +00:00
|
|
|
Date: Fri, 28 Nov 2014 00:08:37 -0600
|
2014-06-22 20:26:31 +00:00
|
|
|
Subject: [PATCH] Allow undead horse types to be leashed
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java
|
2014-11-28 01:17:45 +00:00
|
|
|
index 50e9292..0bcf8c9 100644
|
2014-06-22 20:26:31 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityHorse.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityHorse.java
|
2014-11-28 01:17:45 +00:00
|
|
|
@@ -173,7 +173,13 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
2014-06-22 20:26:31 +00:00
|
|
|
}
|
|
|
|
|
2014-11-28 01:17:45 +00:00
|
|
|
public boolean ca() {
|
|
|
|
- return !this.cP() && super.ca();
|
2014-08-05 23:45:22 +00:00
|
|
|
+ // PaperSpigot start - Configurable undead horse leashing
|
|
|
|
+ if (this.world.paperSpigotConfig.allowUndeadHorseLeashing) {
|
2014-11-28 01:17:45 +00:00
|
|
|
+ return super.ca();
|
2014-06-22 20:26:31 +00:00
|
|
|
+ } else {
|
2014-11-28 01:17:45 +00:00
|
|
|
+ return !this.cP() && super.ca();
|
2014-06-22 20:26:31 +00:00
|
|
|
+ }
|
|
|
|
+ // PaperSpigot end
|
|
|
|
}
|
|
|
|
|
2014-11-28 01:17:45 +00:00
|
|
|
protected void n(float f) {
|
2014-07-03 01:47:25 +00:00
|
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2014-08-05 23:45:22 +00:00
|
|
|
index f3bc3aa..b9d1afe 100644
|
2014-07-03 01:47:25 +00:00
|
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
@@ -74,4 +74,11 @@ public class PaperSpigotWorldConfig
|
|
|
|
config.addDefault( "world-settings.default." + path, def );
|
|
|
|
return config.getString( "world-settings." + worldName + "." + path, config.getString( "world-settings.default." + path ) );
|
2014-06-22 20:26:31 +00:00
|
|
|
}
|
2014-06-24 12:21:58 +00:00
|
|
|
+
|
2014-08-05 23:45:22 +00:00
|
|
|
+ public boolean allowUndeadHorseLeashing;
|
2014-06-22 20:26:31 +00:00
|
|
|
+ private void allowUndeadHorseLeashing()
|
|
|
|
+ {
|
2014-07-03 01:47:25 +00:00
|
|
|
+ allowUndeadHorseLeashing = getBoolean( "allow-undead-horse-leashing", true );
|
2014-06-22 20:26:31 +00:00
|
|
|
+ log( "Allow undead horse types to be leashed: " + allowUndeadHorseLeashing );
|
|
|
|
+ }
|
2014-07-13 00:38:57 +00:00
|
|
|
}
|
2014-06-22 20:26:31 +00:00
|
|
|
--
|
|
|
|
1.9.1
|
|
|
|
|