use of net.minecraft.client.multiplayer.GuiConnecting in project MinecraftForge by MinecraftForge.
the class FMLClientHandler method connectToServerAtStartup.
public void connectToServerAtStartup(String host, int port) {
setupServerList();
ServerPinger osp = new ServerPinger();
ServerData serverData = new ServerData("Command Line", host + ":" + port, false);
try {
osp.ping(serverData);
startupConnectionData.await(30, TimeUnit.SECONDS);
} catch (Exception e) {
showGuiScreen(new GuiConnecting(new GuiMainMenu(), client, host, port));
return;
}
connectToServer(new GuiMainMenu(), serverData);
}
use of net.minecraft.client.multiplayer.GuiConnecting in project Wurst-MC-1.10 by Wurst-Imperium.
the class ServerHook method reconnectToLastServer.
public static void reconnectToLastServer(GuiScreen prevScreen) {
if (lastServer == null)
return;
currentServerIP = lastServer.getServerData().serverIP;
if (!currentServerIP.contains(":"))
currentServerIP += ":25565";
Minecraft mc = Minecraft.getMinecraft();
mc.displayGuiScreen(new GuiConnecting(prevScreen, mc, lastServer.getServerData()));
}
use of net.minecraft.client.multiplayer.GuiConnecting in project Wurst-MC-1.12 by Wurst-Imperium.
the class JoinCmd method execute.
@Override
public void execute(String[] args) throws CmdError {
if (args.length != 1)
syntaxError();
Minecraft mc = Minecraft.getMinecraft();
mc.addScheduledTask(() -> {
mc.displayGuiScreen(new GuiConnecting(new GuiWurstMainMenu(), mc, new ServerData("", args[0], false)));
System.out.println("Joined " + args[0] + " as " + mc.session.getUsername());
});
}
use of net.minecraft.client.multiplayer.GuiConnecting in project Wurst-MC-1.9 by Wurst-Imperium.
the class ServerHook method reconnectToLastServer.
public static void reconnectToLastServer(GuiScreen prevScreen) {
if (lastServer == null)
return;
currentServerIP = lastServer.getServerData().serverIP;
if (!currentServerIP.contains(":"))
currentServerIP += ":25565";
Minecraft mc = Minecraft.getMinecraft();
mc.displayGuiScreen(new GuiConnecting(prevScreen, mc, lastServer.getServerData()));
}
use of net.minecraft.client.multiplayer.GuiConnecting in project Wurst-MC-1.12 by Wurst-Imperium.
the class ServerHook method reconnectToLastServer.
public static void reconnectToLastServer(GuiScreen prevScreen) {
if (lastServer == null)
return;
currentServerIP = lastServer.getServerData().serverIP;
if (!currentServerIP.contains(":"))
currentServerIP += ":25565";
Minecraft mc = Minecraft.getMinecraft();
mc.displayGuiScreen(new GuiConnecting(prevScreen, mc, lastServer.getServerData()));
}
Aggregations