本文整理汇总了Java中net.minecraft.client.network.OldServerPinger类的典型用法代码示例。如果您正苦于以下问题:Java OldServerPinger类的具体用法?Java OldServerPinger怎么用?Java OldServerPinger使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OldServerPinger类属于net.minecraft.client.network包,在下文中一共展示了OldServerPinger类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: connectToServerAtStartup
import net.minecraft.client.network.OldServerPinger; //导入依赖的package包/类
public void connectToServerAtStartup(String host, int port)
{
setupServerList();
OldServerPinger osp = new OldServerPinger();
ServerData serverData = new ServerData("Command Line", host+":"+port);
try
{
osp.func_147224_a(serverData);
startupConnectionData.await(30, TimeUnit.SECONDS);
}
catch (Exception e)
{
showGuiScreen(new GuiConnecting(new GuiMainMenu(), client, host, port));
return;
}
connectToServer(new GuiMainMenu(), serverData);
}
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:18,代码来源:FMLClientHandler.java
示例2: ping
import net.minecraft.client.network.OldServerPinger; //导入依赖的package包/类
public void ping(final String ip, final int port) {
server = new ServerData("", ip + ":" + port);
new Thread("Wurst Server Connector #" + threadNumber.incrementAndGet()) {
@Override
public void run() {
OldServerPinger pinger = new OldServerPinger();
try {
logger.info("Pinging " + ip + ":" + port + "...");
pinger.ping(server);
logger.info("Ping successful: " + ip + ":" + port);
} catch (UnknownHostException e) {
logger.info("Unknown host: " + ip + ":" + port);
failed = true;
} catch (Exception e2) {
logger.info("Ping failed: " + ip + ":" + port);
failed = true;
}
pinger.clearPendingNetworks();
done = true;
}
}.start();
}
开发者ID:null-dev,项目名称:EvenWurse,代码行数:23,代码来源:ServerPinger.java
示例3: NetworkUtils
import net.minecraft.client.network.OldServerPinger; //导入依赖的package包/类
public NetworkUtils() {
this.pinger = new OldServerPinger();
this.mc = Minecraft.getMinecraft();
this.timer = new Timer();
EventManager.register(this);
final PingThread pingThread = new PingThread();
pingThread.start();
}
开发者ID:SkidJava,项目名称:BaseClient,代码行数:9,代码来源:NetworkUtils.java
示例4: getOldServerPinger
import net.minecraft.client.network.OldServerPinger; //导入依赖的package包/类
public OldServerPinger getOldServerPinger()
{
return this.oldServerPinger;
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:GuiMultiplayer.java
示例5: func_146789_i
import net.minecraft.client.network.OldServerPinger; //导入依赖的package包/类
public OldServerPinger func_146789_i()
{
return this.field_146797_f;
}
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:5,代码来源:GuiMultiplayer.java
注:本文中的net.minecraft.client.network.OldServerPinger类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论