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

39 lines
1.8 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>
2015-03-08 02:16:09 +01:00
Date: Sat, 7 Mar 2015 19:57:50 -0600
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 {
}
2015-03-08 02:16:09 +01:00
public boolean cb() {
2014-08-06 01:45:22 +02:00
+ // PaperSpigot start - Configurable undead horse leashing
+ if (this.world.paperSpigotConfig.allowUndeadHorseLeashing) {
2015-03-08 02:16:09 +01:00
+ return super.cb();
2014-06-22 22:26:31 +02:00
+ }
+ // PaperSpigot end
2015-03-08 02:16:09 +01:00
return !this.cR() && super.cb();
2014-06-22 22:26:31 +02:00
}
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()
+ {
2015-03-08 02:16:09 +01:00
+ allowUndeadHorseLeashing = getBoolean( "allow-undead-horse-leashing", false );
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
--