mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 23:57:43 +01:00
44 lines
1.8 KiB
Diff
44 lines
1.8 KiB
Diff
From b802cfc9eb7d1f6ec5fe1d52e2e460f53bfcb5be Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <Zbob750@live.com>
|
|
Date: Tue, 5 Aug 2014 16:10:44 -0500
|
|
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 e9f6236..ec43573 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityHorse.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityHorse.java
|
|
@@ -169,7 +169,13 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
|
}
|
|
|
|
public boolean bM() {
|
|
- return !this.cE() && super.bM();
|
|
+ // PaperSpigot start - Configurable undead horse leashing
|
|
+ if (this.world.paperSpigotConfig.allowUndeadHorseLeashing) {
|
|
+ return super.bM();
|
|
+ } else {
|
|
+ return !this.cE() && super.bM();
|
|
+ }
|
|
+ // PaperSpigot end
|
|
}
|
|
|
|
protected void o(float f) {
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
index f3bc3aa..b9d1afe 100644
|
|
--- 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 ) );
|
|
}
|
|
+
|
|
+ public boolean allowUndeadHorseLeashing;
|
|
+ private void allowUndeadHorseLeashing()
|
|
+ {
|
|
+ allowUndeadHorseLeashing = getBoolean( "allow-undead-horse-leashing", true );
|
|
+ log( "Allow undead horse types to be leashed: " + allowUndeadHorseLeashing );
|
|
+ }
|
|
}
|
|
--
|
|
1.9.1
|
|
|