aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorDoKM <mcazzyman@gmail.com>2021-09-17 18:36:40 +0200
committerDoKM <mcazzyman@gmail.com>2021-09-17 18:36:40 +0200
commit2805a0f401e4276403151077e79b3b6df2f892ca (patch)
treeb78b68b519fbae1cc73d9b179a14b038635676a8 /src/main
parent0757e5f0b482b8849b4b13338fd25e8d9755353f (diff)
downloadNotEnoughUpdates-2805a0f401e4276403151077e79b3b6df2f892ca.tar.gz
NotEnoughUpdates-2805a0f401e4276403151077e79b3b6df2f892ca.tar.bz2
NotEnoughUpdates-2805a0f401e4276403151077e79b3b6df2f892ca.zip
Fix not being able to press repeat keys in chat
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
index 716c62c1..e18571c5 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
@@ -19,10 +19,7 @@ import io.github.moulberry.notenoughupdates.overlays.*;
import io.github.moulberry.notenoughupdates.profileviewer.GuiProfileViewer;
import io.github.moulberry.notenoughupdates.util.*;
import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.FontRenderer;
-import net.minecraft.client.gui.Gui;
-import net.minecraft.client.gui.GuiScreen;
-import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.gui.*;
import net.minecraft.client.gui.inventory.GuiChest;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.gui.inventory.GuiEditSign;
@@ -206,7 +203,9 @@ public class NEUEventListener {
@SubscribeEvent
public void onTick(TickEvent.ClientTickEvent event) {
- Keyboard.enableRepeatEvents(false);
+ if(Minecraft.getMinecraft().currentScreen == null || !(Minecraft.getMinecraft().currentScreen instanceof GuiChat)) {
+ Keyboard.enableRepeatEvents(false);
+ }
if(event.phase != TickEvent.Phase.START) return;
if(Minecraft.getMinecraft().theWorld == null) return;
if(Minecraft.getMinecraft().thePlayer == null) return;