mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-15 23:26:16 +01:00
For completeness, work with stacked waypoints
This commit is contained in:
parent
e10af76e45
commit
5081b713a8
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user