diff options
| author | CarsCupcake <84076092+CarsCupcake@users.noreply.github.com> | 2023-08-13 21:23:59 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-13 21:23:59 +0200 |
| commit | eadb0b8044d844216e598984eb654ca06338c826 (patch) | |
| tree | 1cfce3bb521fe9bdd2e0dbf6e918e7daf7810952 /src/main/java/at/hannibal2/skyhanni/features | |
| parent | 89b4748fe31d0d92a49c773bb314bad3f939ad23 (diff) | |
| download | skyhanni-eadb0b8044d844216e598984eb654ca06338c826.tar.gz skyhanni-eadb0b8044d844216e598984eb654ca06338c826.tar.bz2 skyhanni-eadb0b8044d844216e598984eb654ca06338c826.zip | |
Merge pull request #384
* Fishing util additions
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/fishing/BarnFishingTimer.kt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/BarnFishingTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/BarnFishingTimer.kt index 1c420af0c..5eff79532 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/BarnFishingTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/BarnFishingTimer.kt @@ -9,6 +9,7 @@ import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland import at.hannibal2.skyhanni.utils.RenderUtils.renderString import net.minecraft.entity.item.EntityArmorStand import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import org.lwjgl.input.Keyboard class BarnFishingTimer { private val config get() = SkyHanniMod.feature.fishing @@ -32,6 +33,8 @@ class BarnFishingTimer { if (event.isMod(5)) checkMobs() if (event.isMod(7)) tryPlaySound() + val key = if (Keyboard.getEventKey() == 0) Keyboard.getEventCharacter().code + 256 else Keyboard.getEventKey() + if (key == config.manualResetTimer) startTime = System.currentTimeMillis() } private fun tryPlaySound() { @@ -55,6 +58,10 @@ class BarnFishingTimer { if (newCount == 0) { startTime = 0 } + + if (inHollows && newCount >= 60 && config.wormLimitAlert) { + SoundUtils.playBeepSound() + } } private fun countHollowsMobs() = EntityUtils.getEntitiesNextToPlayer<EntityArmorStand>(10.0) |
