diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-12-21 02:01:59 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-12-21 02:01:59 +0100 |
commit | 8307ea7899f6c6a9500f1decccdbe4ef388445b9 (patch) | |
tree | cb7cd9a4fcc60da5151d5789da054b50695a7101 /src/main/java/at | |
parent | 20137951c22863503b1ffe0bc6eada76830cfc06 (diff) | |
download | skyhanni-8307ea7899f6c6a9500f1decccdbe4ef388445b9.tar.gz skyhanni-8307ea7899f6c6a9500f1decccdbe4ef388445b9.tar.bz2 skyhanni-8307ea7899f6c6a9500f1decccdbe4ef388445b9.zip |
Fixed barn fishing reset hotkey triggering while inside a GUI.
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt | 5 |
1 files changed, 4 insertions, 1 deletions
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() { |