diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-12-04 03:18:24 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-12-04 03:18:24 +0100 |
commit | 7c71fdfb64dad217a99a190ad65a3cecf132b863 (patch) | |
tree | 7bfa831b5dffeab91e8b7057c636c888d471a683 /src/main/java/at/hannibal2/skyhanni | |
parent | 04a7e098fb49d0aa26678c07932f7a6de2940a6d (diff) | |
download | skyhanni-7c71fdfb64dad217a99a190ad65a3cecf132b863.tar.gz skyhanni-7c71fdfb64dad217a99a190ad65a3cecf132b863.tar.bz2 skyhanni-7c71fdfb64dad217a99a190ad65a3cecf132b863.zip |
less unnecessary stuff
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt index 520f1283c..b07c4dab6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt @@ -70,16 +70,16 @@ object TrevorFeatures { init { fixedRateTimer(name = "skyhanni-update-trapper", period = 1000L) { - Minecraft.getMinecraft().addScheduledTask { - try { - if (config.trapperSolver && onFarmingIsland()) { + if (onFarmingIsland() && config.trapperSolver) { + Minecraft.getMinecraft().addScheduledTask { + try { updateTrapper() TrevorTracker.update() TrevorTracker.calculatePeltsPerHour() if (questActive) TrevorSolver.findMob() + } catch (error: Throwable) { + ErrorManager.logError(error, "Encountered an error when updating the trapper solver") } - } catch (error: Throwable) { - ErrorManager.logError(error, "Encountered an error when updating the trapper solver") } } } @@ -161,7 +161,6 @@ object TrevorFeatures { ) } - private fun updateTrapper() { timeUntilNextReady -= 1 if (trapperReady && timeUntilNextReady > 0) { |