aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>2024-07-27 23:08:13 +1000
committerGitHub <noreply@github.com>2024-07-27 15:08:13 +0200
commitd9ec38a05b1fc50c16c6e570dda1147fa494ce3f (patch)
treee67f719377e7b06349adc9f414ac4bc5d1482c4c
parent2cf41ed3596f2ea2812b75b2feb12cb8b058aad9 (diff)
downloadnotenoughupdates-d9ec38a05b1fc50c16c6e570dda1147fa494ce3f.tar.gz
notenoughupdates-d9ec38a05b1fc50c16c6e570dda1147fa494ce3f.tar.bz2
notenoughupdates-d9ec38a05b1fc50c16c6e570dda1147fa494ce3f.zip
Fix crash with weird keybind (#1275)
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/TextTabOverlay.java9
1 files changed, 1 insertions, 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;
}