9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-25 09:59:15 +00:00

Fix incorrect coords passing

Co-Authored-By: hayanesuru <68378576+hayanesuru@users.noreply.github.com>
This commit is contained in:
Dreeam
2025-09-30 18:37:01 -04:00
parent db053d5aa9
commit 8a72cfe561

View File

@@ -92,7 +92,7 @@ public final class DespawnMap implements Consumer<Entity> {
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<Entity> {
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];
}