From 322a091b31e72c7e9d73165b345060830d642eb1 Mon Sep 17 00:00:00 2001 From: cattyn Date: Mon, 15 Dec 2025 09:07:03 +0300 Subject: [PATCH] fix(pitch40): working without elytra --- .../com/lambda/module/modules/movement/Pitch40.kt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/com/lambda/module/modules/movement/Pitch40.kt b/src/main/kotlin/com/lambda/module/modules/movement/Pitch40.kt index 1e4c43de4..95fd84617 100644 --- a/src/main/kotlin/com/lambda/module/modules/movement/Pitch40.kt +++ b/src/main/kotlin/com/lambda/module/modules/movement/Pitch40.kt @@ -57,6 +57,11 @@ object Pitch40 : Module( } listen { + if (!player.isGliding) { + reset(player) + return@listen + } + when (state) { Pitch40State.GainSpeed -> { lookAt(Rotation(player.yaw, PITCH_DOWN_DEFAULT)).requestBy(this@Pitch40) @@ -87,12 +92,16 @@ object Pitch40 : Module( } onEnable { - state = Pitch40State.GainSpeed - lastPos = player.pos - lastAngle = PITCH_UP_DEFAULT + reset(player) } } + fun reset(player: ClientPlayerEntity) { + state = Pitch40State.GainSpeed + lastPos = player.pos + lastAngle = PITCH_UP_DEFAULT + } + /** * Get the player's current speed in meters per second. */