aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt11
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) {