From 2805a0f401e4276403151077e79b3b6df2f892ca Mon Sep 17 00:00:00 2001 From: DoKM Date: Fri, 17 Sep 2021 18:36:40 +0200 Subject: Fix not being able to press repeat keys in chat --- .../io/github/moulberry/notenoughupdates/NEUEventListener.java | 9 ++++----- 1 file 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; -- cgit