From 6f122b092aed7ce03eb7fc0c173e356a44103e87 Mon Sep 17 00:00:00 2001 From: mmvanheusden <50550545+mmvanheusden@users.noreply.github.com> Date: Tue, 23 Aug 2022 10:11:43 +0200 Subject: [PATCH 1/3] Add a timer "only when inputting option" --- .../kotlin/com/lambda/client/module/modules/player/Timer.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/com/lambda/client/module/modules/player/Timer.kt b/src/main/kotlin/com/lambda/client/module/modules/player/Timer.kt index 616c578bc..2fe9cd376 100644 --- a/src/main/kotlin/com/lambda/client/module/modules/player/Timer.kt +++ b/src/main/kotlin/com/lambda/client/module/modules/player/Timer.kt @@ -5,6 +5,7 @@ import com.lambda.client.manager.managers.TimerManager.modifyTimer import com.lambda.client.manager.managers.TimerManager.resetTimer import com.lambda.client.module.Category import com.lambda.client.module.Module +import com.lambda.client.util.MovementUtils import net.minecraftforge.fml.common.gameevent.TickEvent object Timer : Module( @@ -13,6 +14,7 @@ object Timer : Module( category = Category.PLAYER, modulePriority = 500 ) { + private val onlyWhenInputting by setting("Only when inputting", false) private val slow by setting("Slow Mode", false) private val tickNormal by setting("Tick N", 2.0f, 1f..10f, 0.1f, { !slow }) private val tickSlow by setting("Tick S", 8f, 1f..10f, 0.1f, { slow }) @@ -26,7 +28,9 @@ object Timer : Module( if (it.phase != TickEvent.Phase.END) return@listener val multiplier = if (!slow) tickNormal else tickSlow / 10.0f - modifyTimer(50.0f / multiplier) + if (onlyWhenInputting) { + if (MovementUtils.isInputting) modifyTimer(50.0f / multiplier) + } else modifyTimer(50.0f / multiplier) } } } \ No newline at end of file From 01916d33be6fd3fa04199a86753b5f9507ff7a32 Mon Sep 17 00:00:00 2001 From: Constructor Date: Wed, 24 Aug 2022 01:34:24 +0200 Subject: [PATCH 2/3] Fix setting name convention --- .../kotlin/com/lambda/client/module/modules/player/Timer.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/com/lambda/client/module/modules/player/Timer.kt b/src/main/kotlin/com/lambda/client/module/modules/player/Timer.kt index 2fe9cd376..f6bdcf925 100644 --- a/src/main/kotlin/com/lambda/client/module/modules/player/Timer.kt +++ b/src/main/kotlin/com/lambda/client/module/modules/player/Timer.kt @@ -14,7 +14,7 @@ object Timer : Module( category = Category.PLAYER, modulePriority = 500 ) { - private val onlyWhenInputting by setting("Only when inputting", false) + private val onlyWhenInputting by setting("Only When Inputting", false) private val slow by setting("Slow Mode", false) private val tickNormal by setting("Tick N", 2.0f, 1f..10f, 0.1f, { !slow }) private val tickSlow by setting("Tick S", 8f, 1f..10f, 0.1f, { slow }) From fb92ccfda349f8006aadbe82862b83938730bda0 Mon Sep 17 00:00:00 2001 From: Constructor Date: Mon, 5 Sep 2022 00:58:49 +0200 Subject: [PATCH 3/3] Make timer pause in ClickGUI --- .../kotlin/com/lambda/client/module/modules/player/Timer.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/kotlin/com/lambda/client/module/modules/player/Timer.kt b/src/main/kotlin/com/lambda/client/module/modules/player/Timer.kt index f6bdcf925..d0ad54d3e 100644 --- a/src/main/kotlin/com/lambda/client/module/modules/player/Timer.kt +++ b/src/main/kotlin/com/lambda/client/module/modules/player/Timer.kt @@ -5,6 +5,7 @@ import com.lambda.client.manager.managers.TimerManager.modifyTimer import com.lambda.client.manager.managers.TimerManager.resetTimer import com.lambda.client.module.Category import com.lambda.client.module.Module +import com.lambda.client.module.modules.client.ClickGUI import com.lambda.client.util.MovementUtils import net.minecraftforge.fml.common.gameevent.TickEvent @@ -27,6 +28,11 @@ object Timer : Module( listener { if (it.phase != TickEvent.Phase.END) return@listener + if (ClickGUI.isEnabled) { + resetTimer() + return@listener + } + val multiplier = if (!slow) tickNormal else tickSlow / 10.0f if (onlyWhenInputting) { if (MovementUtils.isInputting) modifyTimer(50.0f / multiplier)