From f49e79cf42093e93b47f31ade32947f682ffa299 Mon Sep 17 00:00:00 2001 From: LAX1DUDE Date: Fri, 19 Aug 2022 20:09:04 -0700 Subject: [PATCH] Update GuiScreenLANConnecting.java --- .../lax1dude/eaglercraft/GuiScreenLANConnecting.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/lax1dude/eaglercraft/GuiScreenLANConnecting.java b/src/main/java/net/lax1dude/eaglercraft/GuiScreenLANConnecting.java index 9d4dbc8..c838f67 100644 --- a/src/main/java/net/lax1dude/eaglercraft/GuiScreenLANConnecting.java +++ b/src/main/java/net/lax1dude/eaglercraft/GuiScreenLANConnecting.java @@ -16,6 +16,8 @@ public class GuiScreenLANConnecting extends GuiScreen { private boolean completed = false; + private NetClientHandler netHandler = null; + public GuiScreenLANConnecting(GuiScreen parent, String code) { this.parent = parent; this.code = code; @@ -25,6 +27,12 @@ public class GuiScreenLANConnecting extends GuiScreen { return false; } + public void updateScreen() { + if(netHandler != null) { + netHandler.processReadPackets(); + } + } + public void drawScreen(int par1, int par2, float par3) { this.drawDefaultBackground(); StringTranslate st = StringTranslate.getInstance(); @@ -53,7 +61,7 @@ public class GuiScreenLANConnecting extends GuiScreen { completed = true; try { - NetClientHandler netHandler = new NetClientHandler(mc, netMgr); + netHandler = new NetClientHandler(mc, netMgr); this.mc.setNetManager(netMgr); netHandler.addToSendQueue(new Packet2ClientProtocol(61, EaglerProfile.username, "127.0.0.1", mc.gameSettings.renderDistance)); } catch (IOException e) {