From 213bd10442163e34925aeed9233c500ecc378b5f Mon Sep 17 00:00:00 2001 From: Eclipses <99494277+EclipsesDev@users.noreply.github.com> Date: Fri, 20 Dec 2024 16:07:51 +0700 Subject: [PATCH] fix(legacy): noslow consume & sprint working incorrectly (#4977) --- .../liquidbounce/features/module/modules/movement/NoSlow.kt | 2 +- .../liquidbounce/features/module/modules/movement/Sprint.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/NoSlow.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/NoSlow.kt index 56ed3ccd9f8..91799a66045 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/NoSlow.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/NoSlow.kt @@ -101,7 +101,7 @@ object NoSlow : Module("NoSlow", Category.MOVEMENT, gameDetecting = false, hideM return@handler if (isUsingItem || shouldSwap) { - if (heldItem.item !is ItemSword && !consumeFoodOnly && heldItem.item is ItemFood || + if (heldItem.item is ItemSword || !consumeFoodOnly && heldItem.item is ItemFood || !consumeDrinkOnly && (heldItem.item is ItemPotion || heldItem.item is ItemBucketMilk) ) { return@handler diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/Sprint.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/Sprint.kt index 7b1d5ea6327..bef8b60f56c 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/Sprint.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/Sprint.kt @@ -60,7 +60,7 @@ object Sprint : Module("Sprint", Category.MOVEMENT, gameDetecting = false, hideM return } - if ((onlyOnSprintPress || !handleEvents()) && !player.isSprinting && !mc.gameSettings.keyBindSprint.isKeyDown && !SuperKnockback.startSprint() && !isSprinting) + if (!handleEvents() || onlyOnSprintPress && !player.isSprinting && !mc.gameSettings.keyBindSprint.isKeyDown && !SuperKnockback.startSprint() && !isSprinting) return if (Scaffold.handleEvents()) {