some glue

This commit is contained in:
Leijurv 2018-08-04 23:28:32 -04:00
parent b1ced3fe84
commit 4fc74a85c1
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -1,11 +1,33 @@
package baritone.bot.behavior;
import baritone.bot.pathing.path.IPath;
import baritone.bot.pathing.path.PathExecutor;
public class PathingBehavior extends Behavior{
public static final PathingBehavior INSTANCE=new PathingBehavior();
private PathingBehavior(){}
public class PathingBehavior extends Behavior {
public static final PathingBehavior INSTANCE = new PathingBehavior();
private PathingBehavior() {
}
private PathExecutor current;
@Override
public void onTick() {
if (current == null) {
return;
}
current.onTick();
if (current.failed() || current.finished()) {
current = null;
}
}
public PathExecutor getExecutor() {
return current;
}
public IPath getPath() {
return current.getPath();
}
}