From 2a28e69e31a3740461d7b49324f486fdb57277c7 Mon Sep 17 00:00:00 2001 From: LAX1DUDE Date: Fri, 11 Mar 2022 14:26:06 -0800 Subject: [PATCH] fixed chat gui crash when closed --- src/main/java/net/lax1dude/eaglercraft/ConfigConstants.java | 2 +- src/main/java/net/minecraft/client/Minecraft.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/lax1dude/eaglercraft/ConfigConstants.java b/src/main/java/net/lax1dude/eaglercraft/ConfigConstants.java index fbd9455..df4ca5f 100644 --- a/src/main/java/net/lax1dude/eaglercraft/ConfigConstants.java +++ b/src/main/java/net/lax1dude/eaglercraft/ConfigConstants.java @@ -4,7 +4,7 @@ public class ConfigConstants { public static boolean profanity = false; - public static final String version = "22w10c"; + public static final String version = "22w10d"; public static final String mainMenuString = "eaglercraft " + version; public static final String forkMe = "https://github.com/LAX1DUDE/eaglercraft"; diff --git a/src/main/java/net/minecraft/client/Minecraft.java b/src/main/java/net/minecraft/client/Minecraft.java index cd5b76f..4602ac9 100644 --- a/src/main/java/net/minecraft/client/Minecraft.java +++ b/src/main/java/net/minecraft/client/Minecraft.java @@ -429,6 +429,9 @@ public class Minecraft implements Runnable { EaglerAdapter.glDisable(EaglerAdapter.GL_BLEND); EaglerAdapter.glEnable(EaglerAdapter.GL_ALPHA_TEST); EaglerAdapter.glAlphaFunc(EaglerAdapter.GL_GREATER, 0.1F); + + while(EaglerAdapter.keysNext()); + while(EaglerAdapter.mouseNext()); } /** @@ -496,9 +499,6 @@ public class Minecraft implements Runnable { this.currentScreen.onGuiClosed(); } - while(EaglerAdapter.keysNext()); - while(EaglerAdapter.mouseNext()); - if (par1GuiScreen == null && this.theWorld == null) { par1GuiScreen = new GuiMainMenu(); } else if (par1GuiScreen == null && this.thePlayer.getHealth() <= 0) {