aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0480-Configurable-max-leash-distance.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0480-Configurable-max-leash-distance.patch')
-rw-r--r--patches/server/0480-Configurable-max-leash-distance.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/patches/server/0480-Configurable-max-leash-distance.patch b/patches/server/0480-Configurable-max-leash-distance.patch
new file mode 100644
index 0000000000..404169cae8
--- /dev/null
+++ b/patches/server/0480-Configurable-max-leash-distance.patch
@@ -0,0 +1,19 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jake Potrebic <[email protected]>
+Date: Sun, 3 Jan 2021 21:04:03 -0800
+Subject: [PATCH] Configurable max leash distance
+
+
+diff --git a/src/main/java/net/minecraft/world/entity/Leashable.java b/src/main/java/net/minecraft/world/entity/Leashable.java
+index 1f2d04a456c383815b0c5ef331471593556fd128..30d7dd9646ba9d6a9396dc140a61eb2cac07dfc6 100644
+--- a/src/main/java/net/minecraft/world/entity/Leashable.java
++++ b/src/main/java/net/minecraft/world/entity/Leashable.java
+@@ -179,7 +179,7 @@ public interface Leashable {
+ return;
+ }
+
+- if ((double) f > 10.0D) {
++ if ((double) f > entity.level().paperConfig().misc.maxLeashDistance) { // Paper - Configurable max leash distance
+ ((Leashable) entity).leashTooFarBehaviour();
+ } else if ((double) f > 6.0D) {
+ ((Leashable) entity).elasticRangeLeashBehaviour(entity1, f);