From 1d4e3a54c036dd3bde950f3b505d1650160c19d6 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Wed, 1 Nov 2023 22:36:20 +0100 Subject: Removed diana warp data on world switch. --- .../java/at/hannibal2/skyhanni/config/ConfigGuiForgeInterop.kt | 3 ++- .../at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigGuiForgeInterop.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigGuiForgeInterop.kt index 94f609c6e..b0adea115 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/ConfigGuiForgeInterop.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigGuiForgeInterop.kt @@ -18,7 +18,8 @@ class ConfigGuiForgeInterop : IModGuiFactory { override fun getHandlerFor(element: RuntimeOptionCategoryElement): RuntimeOptionGuiHandler? = null - class WrappedSkyHanniConfig(private val parent: GuiScreen) : GuiScreenElementWrapper(ConfigGuiManager.getEditorInstance()) { + class WrappedSkyHanniConfig(private val parent: GuiScreen) : + GuiScreenElementWrapper(ConfigGuiManager.getEditorInstance()) { @Throws(IOException::class) override fun handleKeyboardInput() { if (Keyboard.getEventKeyState() && Keyboard.getEventKey() == Keyboard.KEY_ESCAPE) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt index 0810d53e7..fdb41a87a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt @@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.features.event.diana import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.LorenzKeyPressEvent +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.utils.LocationUtils import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.sorted @@ -53,6 +54,12 @@ class BurrowWarpHelper { } } + @SubscribeEvent + fun onWorldChange(event: LorenzWorldChangeEvent) { + lastWarp = null + currentWarp = null + } + companion object { private val config get() = SkyHanniMod.feature.event.diana var currentWarp: WarpPoint? = null -- cgit