PaperMC/Spigot-Server-Patches/Allow-undead-horse-types-to-be-leashed.patch

42 lines
1.9 KiB
Diff
Raw Normal View History

2014-06-22 22:26:31 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
2014-08-06 01:45:22 +02:00
Date: Tue, 5 Aug 2014 16:10:44 -0500
2014-06-22 22:26:31 +02: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 {
}
public boolean bM() {
- return !this.cE() && super.bM();
2014-08-06 01:45:22 +02:00
+ // PaperSpigot start - Configurable undead horse leashing
+ if (this.world.paperSpigotConfig.allowUndeadHorseLeashing) {
2014-06-22 22:26:31 +02:00
+ 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
2014-06-22 22:26:31 +02:00
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- 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 22:26:31 +02:00
}
+
2014-08-06 01:45:22 +02:00
+ public boolean allowUndeadHorseLeashing;
2014-06-22 22:26:31 +02:00
+ private void allowUndeadHorseLeashing()
+ {
+ allowUndeadHorseLeashing = getBoolean( "allow-undead-horse-leashing", true );
2014-06-22 22:26:31 +02:00
+ log( "Allow undead horse types to be leashed: " + allowUndeadHorseLeashing );
+ }
}
2014-06-22 22:26:31 +02:00
--