Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 19:10:09 +01:00
37 Zeilen
1.5 KiB
Diff
37 Zeilen
1.5 KiB
Diff
From 6bd67621d6773a3127b55f78fd1b30a3b639a315 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 4d6e5fc..38f94ce 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -287,4 +287,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 a81bf3b..8367458 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityHorse.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityHorse.java
|
|
@@ -167,6 +167,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.0
|
|
|