For completeness, work with stacked waypoints

This commit is contained in:
fullwall 2020-10-14 15:16:40 +08:00
parent e10af76e45
commit 5081b713a8

View File

@ -352,7 +352,8 @@ public class LinearWaypointProvider implements EnumerableWaypointProvider {
double minDistance = Double.MAX_VALUE;
for (int i = 0; i < waypoints.size(); i++) {
Waypoint waypoint = waypoints.get(i);
double distance = waypoint.getLocation().distanceSquared(event.getRightClicked().getLocation());
double distance = waypoint.getLocation()
.distanceSquared(event.getRightClicked().getLocation().add(0, -1, 0));
if (minDistance > distance) {
minDistance = distance;
slot = i;