Add method to wander provider to set XY range properly

This commit is contained in:
fullwall 2020-03-22 11:51:32 +08:00
parent 1cd8e1913e
commit 773058fa22

View File

@ -283,6 +283,14 @@ public class WanderWaypointProvider
this.paused = paused; this.paused = paused;
} }
public void setXYRange(int xrange, int yrange) {
this.xrange = xrange;
this.yrange = yrange;
if (currentGoal != null) {
currentGoal.setXYRange(xrange, yrange);
}
}
private class RecalculateList extends ForwardingList<Location> { private class RecalculateList extends ForwardingList<Location> {
@Override @Override
public void add(int idx, Location loc) { public void add(int idx, Location loc) {