mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
55 lines
2.2 KiB
Diff
55 lines
2.2 KiB
Diff
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||
|
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
||
|
Date: Sat, 17 May 2014 00:18:54 -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 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 @@ import org.bukkit.event.entity.EntityDamageEvent;
|
||
|
import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason;
|
||
|
// CraftBukkit end
|
||
|
|
||
|
+// PaperSpigot start
|
||
|
+import org.spigotmc.SpigotWorldConfig;
|
||
|
+// PaperSpigot end
|
||
|
+
|
||
|
public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||
|
|
||
|
private static final IEntitySelector bu = new EntitySelectorHorse();
|
||
|
@@ -0,0 +0,0 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||
|
}
|
||
|
|
||
|
public boolean bM() {
|
||
|
- return !this.cE() && super.bM();
|
||
|
+ // PaperSpigot start - Configurable undead horse leashing
|
||
|
+ if (SpigotWorldConfig.allowUndeadHorseLeashing) {
|
||
|
+ return super.bM();
|
||
|
+ } else {
|
||
|
+ return !this.cE() && super.bM();
|
||
|
+ }
|
||
|
+ // PaperSpigot end
|
||
|
}
|
||
|
|
||
|
protected void o(float f) {
|
||
|
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||
|
@@ -0,0 +0,0 @@ public class SpigotWorldConfig
|
||
|
log( "Allow Zombie Pigmen to spawn from portal blocks: " + enableZombiePigmenPortalSpawns );
|
||
|
}
|
||
|
|
||
|
+ public static boolean allowUndeadHorseLeashing;
|
||
|
+ private void allowUndeadHorseLeashing()
|
||
|
+ {
|
||
|
+ allowUndeadHorseLeashing = getBoolean( "allow-undead-horse-leashing", true);
|
||
|
+ log( "Allow undead horse types to be leashed: " + allowUndeadHorseLeashing );
|
||
|
+ }
|
||
|
+
|
||
|
public int maxBulkChunk;
|
||
|
private void bulkChunkCount()
|
||
|
{
|
||
|
--
|