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 c09702cef82655997b7ace1787a8ee295b1f7211 Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
|
Date: Fri, 28 Nov 2014 00:08:37 -0600
|
|
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 50e9292..0bcf8c9 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityHorse.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityHorse.java
|
|
@@ -173,7 +173,13 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
|
}
|
|
|
|
public boolean ca() {
|
|
- return !this.cP() && super.ca();
|
|
+ // PaperSpigot start - Configurable undead horse leashing
|
|
+ if (this.world.paperSpigotConfig.allowUndeadHorseLeashing) {
|
|
+ return super.ca();
|
|
+ } else {
|
|
+ return !this.cP() && super.ca();
|
|
+ }
|
|
+ // PaperSpigot end
|
|
}
|
|
|
|
protected void n(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
|
|
|