2020-05-06 09:48:49 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2016-03-18 18:20:11 +00:00
|
|
|
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
|
2020-05-06 09:48:49 +00:00
|
|
|
index 04430aae52205ee167662004e45c145b9d2e8bed..dd21221534542d0265fa7d2178ab69c236579cf7 100644
|
2016-03-18 18:20:11 +00:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2020-01-18 17:28:32 +00:00
|
|
|
@@ -208,4 +208,9 @@ public class PaperWorldConfig {
|
2016-07-17 01:10:43 +00:00
|
|
|
private void nonPlayerEntitiesOnScoreboards() {
|
|
|
|
nonPlayerEntitiesOnScoreboards = getBoolean("allow-non-player-entities-on-scoreboards", false);
|
2016-03-18 18:20:11 +00:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean allowLeashingUndeadHorse = false;
|
|
|
|
+ private void allowLeashingUndeadHorse() {
|
|
|
|
+ allowLeashingUndeadHorse = getBoolean("allow-leashing-undead-horse", false);
|
|
|
|
+ }
|
|
|
|
}
|
2016-11-17 02:23:38 +00:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityHorseAbstract.java b/src/main/java/net/minecraft/server/EntityHorseAbstract.java
|
2020-05-06 09:48:49 +00:00
|
|
|
index b611ade24817a7d6a740bf5366816b6694d79713..c56efe035ac87e5ef49ad39d82499c7348ee8d2f 100644
|
2016-11-17 02:23:38 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityHorseAbstract.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityHorseAbstract.java
|
2019-04-26 01:24:00 +00:00
|
|
|
@@ -107,7 +107,7 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven
|
2016-03-18 18:20:11 +00:00
|
|
|
|
2019-04-26 01:24:00 +00:00
|
|
|
@Override
|
2016-03-18 18:20:11 +00:00
|
|
|
public boolean a(EntityHuman entityhuman) {
|
2016-11-17 02:23:38 +00:00
|
|
|
- return super.a(entityhuman) && this.getMonsterType() != EnumMonsterType.UNDEAD;
|
|
|
|
+ return world.paperConfig.allowLeashingUndeadHorse ? super.a(entityhuman) : super.a(entityhuman) && this.getMonsterType() != EnumMonsterType.UNDEAD; // Paper
|
2016-03-18 18:20:11 +00:00
|
|
|
}
|
|
|
|
|
2019-04-26 01:24:00 +00:00
|
|
|
@Override
|