9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-29 03:49:21 +00:00
Files
Leaf/leaf-server/minecraft-patches/features/0187-Paper-Fix-incorrect-createPath-overload-arguments.patch
2025-07-08 19:25:23 +02:00

30 lines
1.5 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Date: Thu, 3 Jul 2025 12:40:19 -0700
Subject: [PATCH] Paper: Fix incorrect createPath overload arguments
Original license: GPLv3
Original project: https://github.com/PaperMC/Paper
https://github.com/PaperMC/Paper/commit/6e598f852727aeb061a446e2319b8fb3a35f7609
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
Fix incorrect createPath overload arguments, fixes Paper#12043
This was missed during the 1.21.2 update process.
diff --git a/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/net/minecraft/world/entity/ai/navigation/PathNavigation.java
index 25ef9b67eee01c6df466031c5dbc728b1a754ab2..8799f52241758c9226e364312916a1c0a2bd1f04 100644
--- a/net/minecraft/world/entity/ai/navigation/PathNavigation.java
+++ b/net/minecraft/world/entity/ai/navigation/PathNavigation.java
@@ -155,7 +155,7 @@ public abstract class PathNavigation {
@Nullable
protected Path createPath(Set<BlockPos> targets, @Nullable Entity target, int regionOffset, boolean offsetUpward, int accuracy) {
- return this.createPath(targets, target, regionOffset, offsetUpward, accuracy, (float) this.mob.getAttributeValue(Attributes.FOLLOW_RANGE));
+ return this.createPath(targets, target, regionOffset, offsetUpward, accuracy, this.getMaxPathLength()); // Paper - Fix incorrect createPath overload arguments
}
@Nullable