From 6e93f5174b4bb2c4517863824eb71844af0d2b43 Mon Sep 17 00:00:00 2001 From: Empa <42304516+ItsEmpa@users.noreply.github.com> Date: Mon, 8 Apr 2024 21:59:45 +0200 Subject: Fix: Pest Count Issues v2 (#1386) --- .../java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2') 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 -- cgit