aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmpa <42304516+ItsEmpa@users.noreply.github.com>2024-04-08 21:59:45 +0200
committerGitHub <noreply@github.com>2024-04-08 21:59:45 +0200
commit6e93f5174b4bb2c4517863824eb71844af0d2b43 (patch)
treefd2f59e2faf961469e6d0991d525b545c6f59301
parent0af01946862fdd1ec4306838c786bb1bb325e51a (diff)
downloadskyhanni-6e93f5174b4bb2c4517863824eb71844af0d2b43.tar.gz
skyhanni-6e93f5174b4bb2c4517863824eb71844af0d2b43.tar.bz2
skyhanni-6e93f5174b4bb2c4517863824eb71844af0d2b43.zip
Fix: Pest Count Issues v2 (#1386)
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt
index 9c595de1e..19f273899 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt
@@ -18,6 +18,7 @@ import at.hannibal2.skyhanni.features.garden.GardenPlotAPI.pests
import at.hannibal2.skyhanni.features.garden.GardenPlotAPI.uncleared
import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.ChatUtils
+import at.hannibal2.skyhanni.utils.DelayedRun
import at.hannibal2.skyhanni.utils.InventoryUtils
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.LocationUtils.distanceSqToPlayer
@@ -31,6 +32,7 @@ import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import org.lwjgl.input.Keyboard
+import kotlin.time.Duration.Companion.seconds
object PestAPI {
@@ -132,8 +134,11 @@ object PestAPI {
}
private fun updatePests() {
- fixPests()
PestUpdateEvent().postAndCatch()
+ DelayedRun.runDelayed(3.seconds) {
+ fixPests()
+ PestUpdateEvent().postAndCatch()
+ }
}
@SubscribeEvent