/** * Invoked when disconnecting, the parameter is a ChatComponent describing the reason for termination */ public void onDisconnect(IChatComponent reason) { this.gameController.loadWorld((WorldClient)null); if (this.guiScreenServer != null) { if (this.guiScreenServer instanceof GuiScreenRealmsProxy) { this.gameController.displayGuiScreen((new DisconnectedRealmsScreen(((GuiScreenRealmsProxy)this.guiScreenServer).func_154321_a(), "disconnect.lost", reason)).getProxy()); } else { this.gameController.displayGuiScreen(new GuiDisconnected(this.guiScreenServer, "disconnect.lost", reason)); } } else { this.gameController.displayGuiScreen(new GuiDisconnected(new GuiMultiplayer(new GuiMainMenu()), "disconnect.lost", reason)); } }
/** * Invoked when disconnecting, the parameter is a ChatComponent describing the * reason for termination */ public void onDisconnect(IChatComponent reason) { this.gameController.loadWorld((WorldClient) null); if (this.guiScreenServer != null) { if (this.guiScreenServer instanceof GuiScreenRealmsProxy) { this.gameController.displayGuiScreen( (new DisconnectedRealmsScreen(((GuiScreenRealmsProxy) this.guiScreenServer).func_154321_a(), "disconnect.lost", reason)).getProxy()); } else { this.gameController .displayGuiScreen(new GuiDisconnected(this.guiScreenServer, "disconnect.lost", reason)); } } else { this.gameController.displayGuiScreen( new GuiDisconnected(new GuiMultiplayer(new GuiMainMenu()), "disconnect.lost", reason)); } }
/** * Invoked when disconnecting, the parameter is a ChatComponent describing the reason for termination */ public void onDisconnect(ITextComponent reason) { this.gameController.loadWorld((WorldClient)null); if (this.guiScreenServer != null) { if (this.guiScreenServer instanceof GuiScreenRealmsProxy) { this.gameController.displayGuiScreen((new DisconnectedRealmsScreen(((GuiScreenRealmsProxy)this.guiScreenServer).getProxy(), "disconnect.lost", reason)).getProxy()); } else { this.gameController.displayGuiScreen(new GuiDisconnected(this.guiScreenServer, "disconnect.lost", reason)); } } else { this.gameController.displayGuiScreen(new GuiDisconnected(new GuiMultiplayer(new GuiMainMenu()), "disconnect.lost", reason)); } }
public GuiScreenRealmsProxy getNotificationScreen(GuiScreen p_getNotificationScreen_1_) { try { this.previousScreen = p_getNotificationScreen_1_; Class<?> oclass = Class.forName("com.mojang.realmsclient.gui.screens.RealmsNotificationsScreen"); Constructor<?> constructor = oclass.getDeclaredConstructor(new Class[] {RealmsScreen.class}); constructor.setAccessible(true); Object object = constructor.newInstance(new Object[] {this}); return ((RealmsScreen)object).getProxy(); } catch (ClassNotFoundException var5) { LOGGER.error("Realms module missing"); } catch (Exception exception) { LOGGER.error((String)"Failed to load Realms module", (Throwable)exception); } return null; }
public void onDisconnect(IChatComponent p_147231_1_) { this.gameController.loadWorld((WorldClient)null); if (this.guiScreenServer != null) { if (this.guiScreenServer instanceof GuiScreenRealmsProxy) { this.gameController.displayGuiScreen((new DisconnectedOnlineScreen(((GuiScreenRealmsProxy)this.guiScreenServer).func_154321_a(), "disconnect.lost", p_147231_1_)).getProxy()); } else { this.gameController.displayGuiScreen(new GuiDisconnected(this.guiScreenServer, "disconnect.lost", p_147231_1_)); } } else { this.gameController.displayGuiScreen(new GuiDisconnected(new GuiMultiplayer(new GuiMainMenu()), "disconnect.lost", p_147231_1_)); } }
/** * Invoked when disconnecting, the parameter is a ChatComponent describing the reason for termination */ public void onDisconnect(ITextComponent reason) { if (this.previousGuiScreen != null && this.previousGuiScreen instanceof GuiScreenRealmsProxy) { this.mc.displayGuiScreen((new DisconnectedRealmsScreen(((GuiScreenRealmsProxy)this.previousGuiScreen).getProxy(), "connect.failed", reason)).getProxy()); } else { this.mc.displayGuiScreen(new GuiDisconnected(this.previousGuiScreen, "connect.failed", reason)); } }
public GuiScreenRealmsProxy getProxy() { return this.proxy; }