mirror of https://github.com/cabaletta/baritone
fix nudgeToLevel with smoothLook
This commit is contained in:
parent
0ca173f5dc
commit
7aa3eda3f6
|
@ -117,9 +117,9 @@ public final class LookBehavior extends Behavior implements ILookBehavior {
|
|||
ctx.player().rotationPitch = this.prevRotation.getPitch();
|
||||
} else if ((ctx.player().isElytraFlying() && Baritone.settings().elytraSmoothLook.value) || (!ctx.player().isElytraFlying() && Baritone.settings().smoothLook.value)) {
|
||||
ctx.player().rotationYaw = (float) this.smoothYawBuffer.stream().mapToDouble(d -> d).average().orElseGet(this.prevRotation::getYaw);
|
||||
ctx.player().rotationPitch = ctx.player().isElytraFlying()
|
||||
? (float) this.smoothPitchBuffer.stream().mapToDouble(d -> d).average().orElseGet(this.prevRotation::getPitch)
|
||||
: this.prevRotation.getPitch();
|
||||
if (ctx.player().isElytraFlying()) {
|
||||
ctx.player().rotationPitch = (float) this.smoothPitchBuffer.stream().mapToDouble(d -> d).average().orElseGet(this.prevRotation::getPitch);
|
||||
}
|
||||
}
|
||||
|
||||
this.prevRotation = null;
|
||||
|
|
Loading…
Reference in New Issue