mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-18 11:22:15 +01:00
Undead horse leashing
default false to match vanilla, but option to allow undead horse types to be leashed.
This commit is contained in:
parent
63b6980015
commit
91b4746fe0
1 changed files with 34 additions and 0 deletions
34
Spigot-Server-Patches/Undead-horse-leashing.patch
Normal file
34
Spigot-Server-Patches/Undead-horse-leashing.patch
Normal file
|
@ -0,0 +1,34 @@
|
|||
From 0000000000000000000000000000000000000000 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHorse.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHorse.java
|
||||
@@ -0,0 +0,0 @@ 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);
|
||||
}
|
||||
|
||||
--
|
Loading…
Add table
Reference in a new issue