Skip to content

Commit

Permalink
Fixed barn fishing reset hotkey triggering while inside a GUI.
Browse files Browse the repository at this point in the history
  • Loading branch information
hannibal002 committed Dec 21, 2023
1 parent 2013795 commit 8307ea7
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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() {
Expand Down

0 comments on commit 8307ea7

Please sign in to comment.