diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-01-07 20:48:53 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-01-07 20:48:53 +0100 |
commit | aab187a1fd095cb4f7244ad3c41dfb46c832b215 (patch) | |
tree | 517d48641643c7b13c8be87e36e4ebb0bc82b0dc | |
parent | cb75897ffa0707046590169736539af2043f1e0e (diff) | |
download | skyhanni-aab187a1fd095cb4f7244ad3c41dfb46c832b215.tar.gz skyhanni-aab187a1fd095cb4f7244ad3c41dfb46c832b215.tar.bz2 skyhanni-aab187a1fd095cb4f7244ad3c41dfb46c832b215.zip |
Fixed can not remove nearest pest.
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestFinder.kt | 12 |
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. |