3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00
Paper/Spigot-Server-Patches/0082-Undead-horse-leashing.patch
2016-06-08 23:42:46 -05:00

37 Zeilen
1.5 KiB
Diff

From 0e2562f117605d13549f2837949909da33c67621 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 14:19:19 -0400
Subject: [PATCH] Undead horse leashing
default false to match vanilla, but option to allow undead horse types to be leashed.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 48ea25c..57e1fcf 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -274,4 +274,9 @@ public class PaperWorldConfig {
private void useHopperCheck() {
useHopperCheck = getBoolean("use-hopper-check", false);
}
+
+ public boolean allowLeashingUndeadHorse = false;
+ private void allowLeashingUndeadHorse() {
+ allowLeashingUndeadHorse = getBoolean("allow-leashing-undead-horse", false);
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java
index ef429c1..38c4f61 100644
--- a/src/main/java/net/minecraft/server/EntityHorse.java
+++ b/src/main/java/net/minecraft/server/EntityHorse.java
@@ -169,6 +169,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener, IJu
}
public boolean a(EntityHuman entityhuman) {
+ if (world.paperConfig.allowLeashingUndeadHorse) { return super.a(entityhuman); } // Paper
return !this.getType().h() && super.a(entityhuman);
}
--
2.8.3