aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-04 03:18:24 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-04 03:18:24 +0100
commit7c71fdfb64dad217a99a190ad65a3cecf132b863 (patch)
tree7bfa831b5dffeab91e8b7057c636c888d471a683 /src/main/java/at/hannibal2/skyhanni
parent04a7e098fb49d0aa26678c07932f7a6de2940a6d (diff)
downloadskyhanni-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.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) {