From 1e58ad0c55592a067a4cad8ceeb6f5564fe5cfc9 Mon Sep 17 00:00:00 2001 From: Aikar 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 04430aae52..dd21221534 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -208,4 +208,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 b611ade248..c56efe035a 100644 --- a/src/main/java/net/minecraft/server/EntityHorseAbstract.java +++ b/src/main/java/net/minecraft/server/EntityHorseAbstract.java @@ -107,7 +107,7 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven @Override 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 } @Override -- 2.25.1