Incorrect comparison

This commit is contained in:
fullwall 2019-01-19 15:35:09 +08:00
parent e61af2d351
commit d7aab0acbd

View File

@ -49,7 +49,7 @@ public class WanderWaypointProvider implements WaypointProvider, Supplier<QuadTr
double minDist = Double.MAX_VALUE;
for (Location centre : regionCentres) {
double d = centre.distanceSquared(npc.getStoredLocation());
if (d > minDist) {
if (d < minDist) {
minDist = d;
closestCentre = centre;
}