ticks remaining in segment
This commit is contained in:
parent
28fd9581bc
commit
6be7786707
@ -122,7 +122,7 @@ public class PathingBehavior extends Behavior {
|
|||||||
// and this path dosen't get us all the way there
|
// and this path dosen't get us all the way there
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (current.getPath().ticksRemainingFrom(current.getPosition()) < Baritone.settings().planningTickLookAhead.get()) {
|
if (ticksRemainingInSegment().get() < Baritone.settings().planningTickLookAhead.get()) {
|
||||||
// and this path has 5 seconds or less left
|
// and this path has 5 seconds or less left
|
||||||
displayChatMessageRaw("Path almost over. Planning ahead...");
|
displayChatMessageRaw("Path almost over. Planning ahead...");
|
||||||
findPathInNewThread(current.getPath().getDest(), false);
|
findPathInNewThread(current.getPath().getDest(), false);
|
||||||
@ -131,6 +131,13 @@ public class PathingBehavior extends Behavior {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Optional<Double> ticksRemainingInSegment() {
|
||||||
|
if (current == null) {
|
||||||
|
return Optional.empty();
|
||||||
|
}
|
||||||
|
return Optional.of(current.getPath().ticksRemainingFrom(current.getPosition()));
|
||||||
|
}
|
||||||
|
|
||||||
public void setGoal(Goal goal) {
|
public void setGoal(Goal goal) {
|
||||||
this.goal = goal;
|
this.goal = goal;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user