2014-06-22 15:26:31 -05:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
2015-03-07 19:16:09 -06:00
|
|
|
Date: Sat, 7 Mar 2015 19:57:50 -0600
|
2014-06-22 15:26:31 -05: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
|
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/EntityHorse.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityHorse.java
|
|
|
|
@@ -0,0 +0,0 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
|
|
|
}
|
|
|
|
|
2015-03-07 19:16:09 -06:00
|
|
|
public boolean cb() {
|
2014-08-05 18:45:22 -05:00
|
|
|
+ // PaperSpigot start - Configurable undead horse leashing
|
|
|
|
+ if (this.world.paperSpigotConfig.allowUndeadHorseLeashing) {
|
2015-03-07 19:16:09 -06:00
|
|
|
+ return super.cb();
|
2014-06-22 15:26:31 -05:00
|
|
|
+ }
|
|
|
|
+ // PaperSpigot end
|
2015-03-07 19:16:09 -06:00
|
|
|
return !this.cR() && super.cb();
|
2014-06-22 15:26:31 -05:00
|
|
|
}
|
|
|
|
|
2014-07-02 20:47:25 -05:00
|
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2014-06-22 15:26:31 -05:00
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
2014-07-02 20:47:25 -05:00
|
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
@@ -0,0 +0,0 @@ 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 15:26:31 -05:00
|
|
|
}
|
2014-06-24 07:21:58 -05:00
|
|
|
+
|
2014-08-05 18:45:22 -05:00
|
|
|
+ public boolean allowUndeadHorseLeashing;
|
2014-06-22 15:26:31 -05:00
|
|
|
+ private void allowUndeadHorseLeashing()
|
|
|
|
+ {
|
2015-03-07 19:16:09 -06:00
|
|
|
+ allowUndeadHorseLeashing = getBoolean( "allow-undead-horse-leashing", false );
|
2014-06-22 15:26:31 -05:00
|
|
|
+ log( "Allow undead horse types to be leashed: " + allowUndeadHorseLeashing );
|
|
|
|
+ }
|
2014-07-12 19:38:57 -05:00
|
|
|
}
|
2014-06-22 15:26:31 -05:00
|
|
|
--
|