mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-13 02:51:33 +01:00
commit
625f1ec21c
@ -11,7 +11,6 @@ import net.silentclient.client.gui.elements.IconButton;
|
|||||||
import net.silentclient.client.gui.elements.Input;
|
import net.silentclient.client.gui.elements.Input;
|
||||||
import net.silentclient.client.gui.font.SilentFontRenderer;
|
import net.silentclient.client.gui.font.SilentFontRenderer;
|
||||||
import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils;
|
import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils;
|
||||||
import net.silentclient.client.gui.minecraft.GuiConnecting;
|
|
||||||
import net.silentclient.client.gui.theme.Theme;
|
import net.silentclient.client.gui.theme.Theme;
|
||||||
import net.silentclient.client.utils.MenuBlurUtils;
|
import net.silentclient.client.utils.MenuBlurUtils;
|
||||||
import net.silentclient.client.utils.NotificationUtils;
|
import net.silentclient.client.utils.NotificationUtils;
|
||||||
@ -63,7 +62,7 @@ public class DirectConnectGui extends SilentScreen {
|
|||||||
this.serverData.serverIP = this.silentInputs.get(0).getValue().trim();
|
this.serverData.serverIP = this.silentInputs.get(0).getValue().trim();
|
||||||
this.mc.gameSettings.lastServer = this.silentInputs.get(0).getValue().trim();
|
this.mc.gameSettings.lastServer = this.silentInputs.get(0).getValue().trim();
|
||||||
this.mc.gameSettings.saveOptions();
|
this.mc.gameSettings.saveOptions();
|
||||||
this.mc.displayGuiScreen(new GuiConnecting(parentScreen, this.mc, new ServerData(serverData.serverName, serverData.serverIP, false)));
|
this.parentScreen.connect(new ServerData(serverData.serverName, serverData.serverIP, false));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -160,10 +160,18 @@ public class SilentMultiplayerGui extends SilentScreen {
|
|||||||
public void connectToSelected() {
|
public void connectToSelected() {
|
||||||
ServerData server = savedServerList.getServerData(selectedServer);
|
ServerData server = savedServerList.getServerData(selectedServer);
|
||||||
if(server != null) {
|
if(server != null) {
|
||||||
this.mc.displayGuiScreen(new GuiConnecting(this, this.mc, new ServerData(server.serverName, server.serverIP, false)));
|
this.connect(new ServerData(server.serverName, server.serverIP, false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void connect(ServerData serverData) {
|
||||||
|
if(this.mc.theWorld != null) {
|
||||||
|
this.mc.theWorld.sendQuittingDisconnectingPacket();
|
||||||
|
this.mc.loadWorld(null);
|
||||||
|
}
|
||||||
|
this.mc.displayGuiScreen(new GuiConnecting(this, this.mc, serverData));
|
||||||
|
}
|
||||||
|
|
||||||
public boolean canUpSwap(int index)
|
public boolean canUpSwap(int index)
|
||||||
{
|
{
|
||||||
return index > 0;
|
return index > 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user