mirror of https://github.com/cabaletta/baritone
clarity
This commit is contained in:
parent
452b2c278b
commit
3e94cac567
|
@ -789,16 +789,18 @@ public final class ElytraBehavior extends Behavior implements IElytraBehavior, H
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Pair<Float, Boolean> solvePitch(SolverContext context, Vec3d goalDelta, int relaxation, boolean ignoreLava) {
|
private Pair<Float, Boolean> solvePitch(final SolverContext context, final Vec3d goalDelta,
|
||||||
final int steps = relaxation < 2 ? context.boost.isBoosted() ? 5 : Baritone.settings().elytraSimulationTicks.value : 3;
|
final int relaxation, final boolean ignoreLava) {
|
||||||
|
final boolean desperate = relaxation == 2;
|
||||||
|
final int steps = desperate ? 3 : context.boost.isBoosted() ? 5 : Baritone.settings().elytraSimulationTicks.value;
|
||||||
|
|
||||||
final Float pitch = this.solvePitch(context, goalDelta, steps, relaxation == 2, context.boost.isBoosted(), ignoreLava);
|
final Float pitch = this.solvePitch(context, goalDelta, steps, desperate, context.boost.isBoosted(), ignoreLava);
|
||||||
if (pitch != null) {
|
if (pitch != null) {
|
||||||
return new Pair<>(pitch, false);
|
return new Pair<>(pitch, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Baritone.settings().experimentalTakeoff.value && relaxation > 0) {
|
if (Baritone.settings().experimentalTakeoff.value && relaxation > 0) {
|
||||||
final Float usingFirework = this.solvePitch(context, goalDelta, steps, relaxation == 2, true, ignoreLava);
|
final Float usingFirework = this.solvePitch(context, goalDelta, steps, desperate, true, ignoreLava);
|
||||||
if (usingFirework != null) {
|
if (usingFirework != null) {
|
||||||
return new Pair<>(usingFirework, true);
|
return new Pair<>(usingFirework, true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue