mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
39 lines
No EOL
1.8 KiB
Diff
39 lines
No EOL
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
|
Date: Sat, 7 Mar 2015 19:57:50 -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 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 cb() {
|
|
+ // PaperSpigot start - Configurable undead horse leashing
|
|
+ if (this.world.paperSpigotConfig.allowUndeadHorseLeashing) {
|
|
+ return super.cb();
|
|
+ }
|
|
+ // PaperSpigot end
|
|
return !this.cR() && super.cb();
|
|
}
|
|
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
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 ) );
|
|
}
|
|
+
|
|
+ public boolean allowUndeadHorseLeashing;
|
|
+ private void allowUndeadHorseLeashing()
|
|
+ {
|
|
+ allowUndeadHorseLeashing = getBoolean( "allow-undead-horse-leashing", false );
|
|
+ log( "Allow undead horse types to be leashed: " + allowUndeadHorseLeashing );
|
|
+ }
|
|
}
|
|
--
|