From 7ffb72cae177939d52d022da97c67b14a46c3ed9 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 8 Oct 2023 09:33:15 +0200 Subject: Fixed fishing hook display data not properly resetting on world change. --- .../at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/main/java/at') diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt index ec986f82e..1ecfa75c7 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt @@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.CheckRenderEntityEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.utils.EntityUtils import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzVec @@ -22,6 +23,13 @@ class FishingHookDisplay { private var armorStand: EntityArmorStand? = null private var display = "" + @SubscribeEvent + fun onWorldChange(event: LorenzWorldChangeEvent) { + display = "" + bobberLocation = null + armorStand = null + } + @SubscribeEvent fun onTick(event: LorenzTickEvent) { if (!isEnabled()) return -- cgit