From 5121bb988d881eba2ef145fd19c4fbc4a39d07b3 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 20 Nov 2023 19:50:31 +0100 Subject: better screen close logic --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 1 + src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/at') diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 085b6fcd8..2d0b2e24a 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -676,6 +676,7 @@ class SkyHanniMod { if (screenToOpen != null) { screenTicks++ if (screenTicks == 5) { + Minecraft.getMinecraft().thePlayer.closeScreen() Minecraft.getMinecraft().displayGuiScreen(screenToOpen) screenTicks = 0 screenToOpen = null diff --git a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt index 7477d74bb..3af97e0f9 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt @@ -41,7 +41,6 @@ class GuiEditManager { if (NEUItems.neuHasFocus()) return lastHotkeyPressed = SimpleTimeMark.now() - Minecraft.getMinecraft().thePlayer.closeScreen() openGuiPositionEditor(hotkeyReminder = false) } -- cgit