From 8307ea7899f6c6a9500f1decccdbe4ef388445b9 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 21 Dec 2023 02:01:59 +0100 Subject: Fixed barn fishing reset hotkey triggering while inside a GUI. --- src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt index 501b217f4..8943e74d6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt @@ -15,6 +15,7 @@ import at.hannibal2.skyhanni.utils.RenderUtils.renderString import at.hannibal2.skyhanni.utils.SoundUtils import at.hannibal2.skyhanni.utils.TimeUnit import at.hannibal2.skyhanni.utils.TimeUtils +import net.minecraft.client.Minecraft import net.minecraft.entity.item.EntityArmorStand import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.seconds @@ -41,7 +42,9 @@ class FishingTimer { if (event.isMod(5)) checkMobs() if (event.isMod(7)) tryPlaySound() - if (config.manualResetTimer.isKeyHeld()) startTime = System.currentTimeMillis() + if (config.manualResetTimer.isKeyHeld() && Minecraft.getMinecraft().currentScreen == null) { + startTime = System.currentTimeMillis() + } } private fun tryPlaySound() { -- cgit