From d9ec38a05b1fc50c16c6e570dda1147fa494ce3f Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Sat, 27 Jul 2024 23:08:13 +1000 Subject: Fix crash with weird keybind (#1275) --- .../moulberry/notenoughupdates/overlays/TextTabOverlay.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextTabOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextTabOverlay.java index c64fe21e..f727868c 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextTabOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextTabOverlay.java @@ -22,7 +22,6 @@ package io.github.moulberry.notenoughupdates.overlays; import io.github.moulberry.notenoughupdates.core.config.Position; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiChat; -import org.lwjgl.input.Keyboard; import java.util.List; import java.util.function.Supplier; @@ -49,13 +48,7 @@ public abstract class TextTabOverlay extends TextOverlay { public void realTick() { shouldUpdateOverlay = shouldUpdate(); if (!(Minecraft.getMinecraft().currentScreen instanceof GuiChat)) { - int keycode = Minecraft.getMinecraft().gameSettings.keyBindPlayerList.getKeyCode(); - boolean currentTabState; - if (keycode > 0) { - currentTabState = Keyboard.isKeyDown(keycode); - } else { - currentTabState = false; - } + boolean currentTabState = Minecraft.getMinecraft().gameSettings.keyBindPlayerList.isKeyDown(); if (lastTabState != currentTabState) { lastTabState = currentTabState; } -- cgit