added files.
This commit is contained in:
commit
03a7ed8358
9721 files changed
+828024
No files matched your search
@@ -0,0 +1,45 @@
|
||||
package baritone.api.behavior;
|
||||
|
||||
import baritone.api.pathing.goals.Goal;
|
||||
import baritone.api.pathing.path.IPathExecutor;
|
||||
import java.util.Optional;
|
||||
|
||||
public interface IPathingBehavior extends IBehavior {
|
||||
Optional estimatedTicksToGoal();
|
||||
|
||||
Optional getInProgress();
|
||||
|
||||
default Optional ticksRemainingInSegment(boolean flag) {
|
||||
IPathExecutor current = this.getCurrent();
|
||||
if (current == null) {
|
||||
return Optional.empty();
|
||||
} else {
|
||||
int n = flag ? current.getPosition() : current.getPosition() + 1;
|
||||
return Optional.of(current.getPath().ticksRemainingFrom(n));
|
||||
}
|
||||
}
|
||||
|
||||
boolean isPathing();
|
||||
|
||||
IPathExecutor getNext();
|
||||
|
||||
Goal getGoal();
|
||||
|
||||
IPathExecutor getCurrent();
|
||||
|
||||
default Optional ticksRemainingInSegment() {
|
||||
return this.ticksRemainingInSegment(true);
|
||||
}
|
||||
|
||||
boolean cancelEverything();
|
||||
|
||||
default boolean hasPath() {
|
||||
return this.getCurrent() != null;
|
||||
}
|
||||
|
||||
void forceCancel();
|
||||
|
||||
default Optional getPath() {
|
||||
return Optional.ofNullable(this.getCurrent()).map(IPathExecutor::getPath);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user