mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
38 lines
1.7 KiB
Diff
38 lines
1.7 KiB
Diff
From f69028b687e1bd6a11652475c83091366a7ebf5c 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 93486b4b8..cd20572eb 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -197,4 +197,9 @@ public class PaperWorldConfig {
|
|
private void nonPlayerEntitiesOnScoreboards() {
|
|
nonPlayerEntitiesOnScoreboards = getBoolean("allow-non-player-entities-on-scoreboards", false);
|
|
}
|
|
+
|
|
+ public boolean allowLeashingUndeadHorse = false;
|
|
+ private void allowLeashingUndeadHorse() {
|
|
+ allowLeashingUndeadHorse = getBoolean("allow-leashing-undead-horse", false);
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/EntityHorseAbstract.java b/src/main/java/net/minecraft/server/EntityHorseAbstract.java
|
|
index fbf6aa40d..0fe269bc8 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityHorseAbstract.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityHorseAbstract.java
|
|
@@ -113,7 +113,7 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven
|
|
}
|
|
|
|
public boolean a(EntityHuman entityhuman) {
|
|
- return super.a(entityhuman) && this.getMonsterType() != EnumMonsterType.UNDEAD;
|
|
+ return world.paperConfig.allowLeashingUndeadHorse ? super.a(entityhuman) : super.a(entityhuman) && this.getMonsterType() != EnumMonsterType.UNDEAD; // Paper
|
|
}
|
|
|
|
protected void u(float f) {
|
|
--
|
|
2.18.0
|
|
|