当前位置: 首页>>代码示例>>Java>>正文


Java ServerList.countServers方法代码示例

本文整理汇总了Java中net.minecraft.client.multiplayer.ServerList.countServers方法的典型用法代码示例。如果您正苦于以下问题:Java ServerList.countServers方法的具体用法?Java ServerList.countServers怎么用?Java ServerList.countServers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.client.multiplayer.ServerList的用法示例。


在下文中一共展示了ServerList.countServers方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: func_148195_a

import net.minecraft.client.multiplayer.ServerList; //导入方法依赖的package包/类
public void func_148195_a(ServerList p_148195_1_)
{
    this.field_148198_l.clear();

    for (int i = 0; i < p_148195_1_.countServers(); ++i)
    {
        this.field_148198_l.add(new ServerListEntryNormal(this.owner, p_148195_1_.getServerData(i)));
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:10,代码来源:ServerSelectionList.java

示例2: updateOnlineServers

import net.minecraft.client.multiplayer.ServerList; //导入方法依赖的package包/类
public void updateOnlineServers(ServerList p_148195_1_)
{
    this.serverListInternet.clear();

    for (int i = 0; i < p_148195_1_.countServers(); ++i)
    {
        this.serverListInternet.add(new ServerListEntryNormal(this.owner, p_148195_1_.getServerData(i)));
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:10,代码来源:ServerSelectionList.java

示例3: updateServerList

import net.minecraft.client.multiplayer.ServerList; //导入方法依赖的package包/类
public void updateServerList(ServerList serverList)
{
    this.slenList.clear();

    for (int i = 0; i < serverList.countServers(); ++i)
    {
        this.slenList.add(new CoherenceSLEN(this.owner, serverList.getServerData(i)));
    }
}
 
开发者ID:tasgoon,项目名称:Coherence,代码行数:10,代码来源:CoherenceSSL.java

示例4: addServerToList

import net.minecraft.client.multiplayer.ServerList; //导入方法依赖的package包/类
private void addServerToList(){
	ArrayList serverip = new ArrayList<String>();
	try {
		URL targetURL = new URL("http://thefireplace.bitnamiapp.com/warsmodserverip.txt");
		InputStream in = targetURL.openStream();
		BufferedReader reader = new BufferedReader(new InputStreamReader(in));
		String dona;
		while ((dona = reader.readLine()) != null) {
			dona = dona.trim();
			serverip.add(dona);
		}
		in.close();
	} catch (IOException e) {
		e.printStackTrace();
		return;
	}
	if(serverip.isEmpty())
		return;
	if(serverip.get(0).equals(""))
		return;
	// Automatically adds official server to servers list
	ServerList list = new ServerList(Minecraft.getMinecraft());
	list.loadServerList();
	boolean found = false;
	for (int i = 0; i < list.countServers(); i++) {
		ServerData data = list.getServerData(i);
		if (data.serverName.equals("Wars Mod Battle Server") && data.serverIP.equals(serverip.get(0))) {
			found = true;
			break;
		}
	}
	if (!found) {
		list.addServerData(new ServerData("Wars Mod Battle Server", (String)serverip.get(0), false));
	}
	list.saveServerList();
}
 
开发者ID:The-Fireplace-Minecraft-Mods,项目名称:Wars-Mod,代码行数:37,代码来源:ClientProxy.java

示例5: func_148195_a

import net.minecraft.client.multiplayer.ServerList; //导入方法依赖的package包/类
public void func_148195_a(ServerList p_148195_1_)
{
    this.field_148198_l.clear();

    for (int var2 = 0; var2 < p_148195_1_.countServers(); ++var2)
    {
        this.field_148198_l.add(new ServerListEntryNormal(this.field_148200_k, p_148195_1_.getServerData(var2)));
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:10,代码来源:ServerSelectionList.java

示例6: func_148195_a

import net.minecraft.client.multiplayer.ServerList; //导入方法依赖的package包/类
public void func_148195_a(ServerList p_148195_1_)
{
    this.field_148198_l.clear();

    for (int i = 0; i < p_148195_1_.countServers(); ++i)
    {
        this.field_148198_l.add(new ServerListEntryNormal(this.field_148200_k, p_148195_1_.getServerData(i)));
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:10,代码来源:ServerSelectionList.java


注:本文中的net.minecraft.client.multiplayer.ServerList.countServers方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。