From 8a72cfe561d69ef2bf2df31b02a5ab3858a89b54 Mon Sep 17 00:00:00 2001 From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Date: Tue, 30 Sep 2025 18:37:01 -0400 Subject: [PATCH] Fix incorrect coords passing Co-Authored-By: hayanesuru <68378576+hayanesuru@users.noreply.github.com> --- .../src/main/java/org/dreeam/leaf/world/DespawnMap.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/leaf-server/src/main/java/org/dreeam/leaf/world/DespawnMap.java b/leaf-server/src/main/java/org/dreeam/leaf/world/DespawnMap.java index 61e357b9..fb91c9a9 100644 --- a/leaf-server/src/main/java/org/dreeam/leaf/world/DespawnMap.java +++ b/leaf-server/src/main/java/org/dreeam/leaf/world/DespawnMap.java @@ -92,7 +92,7 @@ public final class DespawnMap implements Consumer { final int i = mob.getType().getCategory().ordinal(); final double hardDist = this.hard[i]; final Vec3 vec3 = mob.position; - final double dist = this.tree.nearestSqr(vec3.x, vec3.z, vec3.y, hardDist); + final double dist = this.tree.nearestSqr(vec3.x, vec3.y, vec3.z, hardDist); if (dist == Double.POSITIVE_INFINITY) { return; } @@ -110,7 +110,7 @@ public final class DespawnMap implements Consumer { public ServerPlayer checkDespawnFallback(final Mob mob) { final Vec3 vec3 = mob.position; - final int i = tree.nearestIdx(vec3.x, vec3.z, vec3.y, Double.POSITIVE_INFINITY); + final int i = tree.nearestIdx(vec3.x, vec3.y, vec3.z, Double.POSITIVE_INFINITY); return i == -1 ? null : this.players[i]; }