本文整理汇总了Java中net.minecraft.client.multiplayer.ServerData.copyFrom方法的典型用法代码示例。如果您正苦于以下问题:Java ServerData.copyFrom方法的具体用法?Java ServerData.copyFrom怎么用?Java ServerData.copyFrom使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.multiplayer.ServerData
的用法示例。
在下文中一共展示了ServerData.copyFrom方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: confirmClicked
import net.minecraft.client.multiplayer.ServerData; //导入方法依赖的package包/类
public void confirmClicked(boolean result, int id)
{
GuiListExtended.IGuiListEntry guilistextended$iguilistentry = this.serverListSelector.func_148193_k() < 0 ? null : this.serverListSelector.getListEntry(this.serverListSelector.func_148193_k());
if (this.deletingServer)
{
this.deletingServer = false;
if (result && guilistextended$iguilistentry instanceof ServerListEntryNormal)
{
this.savedServerList.removeServerData(this.serverListSelector.func_148193_k());
this.savedServerList.saveServerList();
this.serverListSelector.setSelectedSlotIndex(-1);
this.serverListSelector.func_148195_a(this.savedServerList);
}
this.mc.displayGuiScreen(this);
}
else if (this.directConnect)
{
this.directConnect = false;
if (result)
{
this.connectToServer(this.selectedServer);
}
else
{
this.mc.displayGuiScreen(this);
}
}
else if (this.addingServer)
{
this.addingServer = false;
if (result)
{
this.savedServerList.addServerData(this.selectedServer);
this.savedServerList.saveServerList();
this.serverListSelector.setSelectedSlotIndex(-1);
this.serverListSelector.func_148195_a(this.savedServerList);
}
this.mc.displayGuiScreen(this);
}
else if (this.editingServer)
{
this.editingServer = false;
if (result && guilistextended$iguilistentry instanceof ServerListEntryNormal)
{
ServerData serverdata = ((ServerListEntryNormal)guilistextended$iguilistentry).getServerData();
serverdata.serverName = this.selectedServer.serverName;
serverdata.serverIP = this.selectedServer.serverIP;
serverdata.copyFrom(this.selectedServer);
this.savedServerList.saveServerList();
this.serverListSelector.func_148195_a(this.savedServerList);
}
this.mc.displayGuiScreen(this);
}
}
示例2: confirmClicked
import net.minecraft.client.multiplayer.ServerData; //导入方法依赖的package包/类
public void confirmClicked(boolean result, int id)
{
GuiListExtended.IGuiListEntry guilistextended$iguilistentry = this.serverListSelector.getSelected() < 0 ? null : this.serverListSelector.getListEntry(this.serverListSelector.getSelected());
if (this.deletingServer)
{
this.deletingServer = false;
if (result && guilistextended$iguilistentry instanceof ServerListEntryNormal)
{
this.savedServerList.removeServerData(this.serverListSelector.getSelected());
this.savedServerList.saveServerList();
this.serverListSelector.setSelectedSlotIndex(-1);
this.serverListSelector.updateOnlineServers(this.savedServerList);
}
this.mc.displayGuiScreen(this);
}
else if (this.directConnect)
{
this.directConnect = false;
if (result)
{
this.connectToServer(this.selectedServer);
}
else
{
this.mc.displayGuiScreen(this);
}
}
else if (this.addingServer)
{
this.addingServer = false;
if (result)
{
this.savedServerList.addServerData(this.selectedServer);
this.savedServerList.saveServerList();
this.serverListSelector.setSelectedSlotIndex(-1);
this.serverListSelector.updateOnlineServers(this.savedServerList);
}
this.mc.displayGuiScreen(this);
}
else if (this.editingServer)
{
this.editingServer = false;
if (result && guilistextended$iguilistentry instanceof ServerListEntryNormal)
{
ServerData serverdata = ((ServerListEntryNormal)guilistextended$iguilistentry).getServerData();
serverdata.serverName = this.selectedServer.serverName;
serverdata.serverIP = this.selectedServer.serverIP;
serverdata.copyFrom(this.selectedServer);
this.savedServerList.saveServerList();
this.serverListSelector.updateOnlineServers(this.savedServerList);
}
this.mc.displayGuiScreen(this);
}
}