aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-07 20:48:53 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-07 20:48:53 +0100
commitaab187a1fd095cb4f7244ad3c41dfb46c832b215 (patch)
tree517d48641643c7b13c8be87e36e4ebb0bc82b0dc /src/main/java/at/hannibal2
parentcb75897ffa0707046590169736539af2043f1e0e (diff)
downloadskyhanni-aab187a1fd095cb4f7244ad3c41dfb46c832b215.tar.gz
skyhanni-aab187a1fd095cb4f7244ad3c41dfb46c832b215.tar.bz2
skyhanni-aab187a1fd095cb4f7244ad3c41dfb46c832b215.zip
Fixed can not remove nearest pest.
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestFinder.kt12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestFinder.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestFinder.kt
index ad4f97626..cc7019cf1 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestFinder.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestFinder.kt
@@ -141,13 +141,13 @@ class PestFinder {
}
}
- resetAllPests(newPests)
-
- if (newPests == PestAPI.scoreboardPests) return
+ if (newPests != PestAPI.scoreboardPests) {
+ removePests(PestAPI.scoreboardPests - newPests)
+ PestAPI.scoreboardPests = newPests
+ update()
+ }
- removePests(PestAPI.scoreboardPests - newPests)
- PestAPI.scoreboardPests = newPests
- update()
+ resetAllPests(newPests)
}
// Auto fixing plots marked as pests when killing all pests without SkyHanni earlier.