Update GuiScreenLANConnecting.java

This commit is contained in:
LAX1DUDE 2022-08-19 20:09:04 -07:00
parent a1791335b2
commit f49e79cf42

View File

@ -16,6 +16,8 @@ public class GuiScreenLANConnecting extends GuiScreen {
private boolean completed = false; private boolean completed = false;
private NetClientHandler netHandler = null;
public GuiScreenLANConnecting(GuiScreen parent, String code) { public GuiScreenLANConnecting(GuiScreen parent, String code) {
this.parent = parent; this.parent = parent;
this.code = code; this.code = code;
@ -25,6 +27,12 @@ public class GuiScreenLANConnecting extends GuiScreen {
return false; return false;
} }
public void updateScreen() {
if(netHandler != null) {
netHandler.processReadPackets();
}
}
public void drawScreen(int par1, int par2, float par3) { public void drawScreen(int par1, int par2, float par3) {
this.drawDefaultBackground(); this.drawDefaultBackground();
StringTranslate st = StringTranslate.getInstance(); StringTranslate st = StringTranslate.getInstance();
@ -53,7 +61,7 @@ public class GuiScreenLANConnecting extends GuiScreen {
completed = true; completed = true;
try { try {
NetClientHandler netHandler = new NetClientHandler(mc, netMgr); netHandler = new NetClientHandler(mc, netMgr);
this.mc.setNetManager(netMgr); this.mc.setNetManager(netMgr);
netHandler.addToSendQueue(new Packet2ClientProtocol(61, EaglerProfile.username, "127.0.0.1", mc.gameSettings.renderDistance)); netHandler.addToSendQueue(new Packet2ClientProtocol(61, EaglerProfile.username, "127.0.0.1", mc.gameSettings.renderDistance));
} catch (IOException e) { } catch (IOException e) {