eta command should default to NaN not just not showing the eta as suggested by ZacSharp
This commit is contained in:
parent
65974e15ba
commit
2cf973809a
@ -47,21 +47,17 @@ public class ETACommand extends Command {
|
|||||||
}
|
}
|
||||||
IPathingBehavior pathingBehavior = baritone.getPathingBehavior();
|
IPathingBehavior pathingBehavior = baritone.getPathingBehavior();
|
||||||
|
|
||||||
Optional<Double> ticksRemainingInSegment = pathingBehavior.ticksRemainingInSegment();
|
double ticksRemainingInSegment = pathingBehavior.ticksRemainingInSegment().orElse(Double.NaN);
|
||||||
Optional<Double> ticksRemainingInGoal = pathingBehavior.estimatedTicksToGoal();
|
double ticksRemainingInGoal = pathingBehavior.estimatedTicksToGoal().orElse(Double.NaN);
|
||||||
|
|
||||||
if (ticksRemainingInGoal.isPresent() && ticksRemainingInSegment.isPresent()) {
|
logDirect(String.format(
|
||||||
logDirect(String.format(
|
"Next segment: %.1fs (%.0f ticks)\n" +
|
||||||
"Next segment: %.1fs (%.0f ticks)\n" +
|
"Goal: %.1fs (%.0f ticks)",
|
||||||
"Goal: %.1fs (%.0f ticks)",
|
ticksRemainingInSegment / 20, // we just assume tps is 20, it isn't worth the effort that is needed to calculate it exactly
|
||||||
ticksRemainingInSegment.get() / 20, // we just assume tps is 20, it isn't worth the effort that is needed to calculate it exactly
|
ticksRemainingInSegment,
|
||||||
ticksRemainingInSegment.get(),
|
ticksRemainingInGoal / 20,
|
||||||
ticksRemainingInGoal.get() / 20,
|
ticksRemainingInGoal
|
||||||
ticksRemainingInGoal.get()
|
));
|
||||||
));
|
|
||||||
} else {
|
|
||||||
logDirect("Not currently pathing");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user