From 2e959c27fa0e0ec75bf26456df9ba80d2a8e5e5b Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Tue, 17 Sep 2024 08:53:33 +0200 Subject: Fix: Lag spikes in pathfinder (#2525) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- src/main/java/at/hannibal2/skyhanni/features/misc/IslandAreas.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/IslandAreas.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/IslandAreas.kt index c5c0071f9..d85b34cc6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/IslandAreas.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/IslandAreas.kt @@ -30,6 +30,7 @@ import at.hannibal2.skyhanni.utils.renderables.Renderable import at.hannibal2.skyhanni.utils.renderables.Searchable import at.hannibal2.skyhanni.utils.renderables.buildSearchBox import at.hannibal2.skyhanni.utils.renderables.toSearchable +import kotlinx.coroutines.launch import net.minecraft.client.Minecraft import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.seconds @@ -54,7 +55,9 @@ object IslandAreas { } fun noteMoved() { - updateNodes() + SkyHanniMod.coroutineScope.launch { + updateNodes() + } } private fun updateNodes() { -- cgit