aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt5
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() {