aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-01 09:51:07 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-01 09:51:07 +0100
commite29e4ba99b3625061d434517065551dc250b975f (patch)
tree60f32cfefb5b567452a74f86c6cf091785b5ee62 /src
parent1143aad38c39e8dbc509132d884a81360eb7bd58 (diff)
downloadskyhanni-e29e4ba99b3625061d434517065551dc250b975f.tar.gz
skyhanni-e29e4ba99b3625061d434517065551dc250b975f.tar.bz2
skyhanni-e29e4ba99b3625061d434517065551dc250b975f.zip
SkyHanni keybinds no longer work inside SkyHanni config.
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt b/src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt
index d750b7696..3314bde7f 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt
@@ -2,7 +2,9 @@ package at.hannibal2.skyhanni.utils
import at.hannibal2.skyhanni.events.LorenzKeyPressEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
+import io.github.moulberry.moulconfig.gui.GuiScreenElementWrapper
import io.github.moulberry.moulconfig.internal.KeybindHelper
+import net.minecraft.client.Minecraft
import net.minecraft.client.settings.KeyBinding
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import org.apache.commons.lang3.SystemUtils
@@ -25,6 +27,10 @@ object KeyboardManager {
@SubscribeEvent
fun onTick(event: LorenzTickEvent) {
+ val isConfigScreen = Minecraft.getMinecraft().currentScreen is GuiScreenElementWrapper
+ if (isConfigScreen) return
+
+
if (Mouse.getEventButtonState() && Mouse.getEventButton() != -1) {
val key = Mouse.getEventButton() - 100
LorenzKeyPressEvent(key).postAndCatch()