From 7aa3eda3f6d75c5fdaea7a6c4be71921f2e1c34c Mon Sep 17 00:00:00 2001 From: Babbaj Date: Mon, 31 Jul 2023 17:07:38 -0400 Subject: [PATCH] fix nudgeToLevel with smoothLook --- src/main/java/baritone/behavior/LookBehavior.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/baritone/behavior/LookBehavior.java b/src/main/java/baritone/behavior/LookBehavior.java index 133c00e73..9a43f0099 100644 --- a/src/main/java/baritone/behavior/LookBehavior.java +++ b/src/main/java/baritone/behavior/LookBehavior.java @@ -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;