本文整理汇总了Java中net.minecraft.client.gui.ServerListEntryNormal类的典型用法代码示例。如果您正苦于以下问题:Java ServerListEntryNormal类的具体用法?Java ServerListEntryNormal怎么用?Java ServerListEntryNormal使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ServerListEntryNormal类属于net.minecraft.client.gui包,在下文中一共展示了ServerListEntryNormal类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: connectToSelected
import net.minecraft.client.gui.ServerListEntryNormal; //导入依赖的package包/类
@Override
public void connectToSelected() {
ServerSelectionList selector = ReflectionHelper.get(ObfuscatedField.GuiMultiplayer_serverListSelector, serverListSelector, this);
if (selector == null) {
PatchManager.instance().getGlobalAppliedPatches().setPatchSuccessfullyApplied(PatchList.PATCH_ENTITYPLAYERSP, false);
super.connectToSelected();
return;
}
GuiListExtended.IGuiListEntry entry = selector.getSelected() < 0 ? null : selector.getListEntry(selector.getSelected());
if (entry instanceof ServerListEntryNormal)
this.connectToServer(((ServerListEntryNormal) entry).getServerData());
else if (entry instanceof ServerListEntryLanDetected) {
LanServerInfo lanserverinfo = ((ServerListEntryLanDetected) entry).getServerData();
this.connectToServer(new ServerData(lanserverinfo.getServerMotd(), lanserverinfo.getServerIpPort(), true));
}
}
示例2: updateLastServerFromDirectConnect
import net.minecraft.client.gui.ServerListEntryNormal; //导入依赖的package包/类
public static void updateLastServerFromDirectConnect(
GuiMultiplayer guiMultiplayer, ServerData serverData)
{
currentServerIP = serverData.serverIP;
if(!currentServerIP.contains(":"))
currentServerIP += ":25565";
lastServer = new ServerListEntryNormal(guiMultiplayer, serverData);
}
示例3: getServerData
import net.minecraft.client.gui.ServerListEntryNormal; //导入依赖的package包/类
private ServerData getServerData(final GuiMultiplayer mpgui, final int index) {
if (index<0)
return null;
final IGuiListEntry guilistextended$iguilistentry = this.compat.getListEntry(mpgui, index);
if (guilistextended$iguilistentry instanceof ServerListEntryNormal)
return this.compat.getServerData((ServerListEntryNormal) guilistextended$iguilistentry);
return null;
}
示例4: draw
import net.minecraft.client.gui.ServerListEntryNormal; //导入依赖的package包/类
@Override
public void draw(ServerListEntryNormal entry, int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isHovering)
{
entry.drawEntry(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isHovering);
}
示例5: ServerListEntryPublic
import net.minecraft.client.gui.ServerListEntryNormal; //导入依赖的package包/类
public ServerListEntryPublic(GuiMultiplayer mp, ServerListEntryNormal wrapped)
{
super(mp, wrapped.func_148296_a());
owner = mp;
this.wrapped = wrapped;
}
示例6: draw
import net.minecraft.client.gui.ServerListEntryNormal; //导入依赖的package包/类
@Override
public void draw(ServerListEntryNormal entry, int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isHovering)
{
entry.func_192634_a(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isHovering, 0);
}
示例7: ServerListEntryPublic
import net.minecraft.client.gui.ServerListEntryNormal; //导入依赖的package包/类
public ServerListEntryPublic(GuiMultiplayer mp, ServerListEntryNormal wrapped)
{
super(mp, wrapped.getServerData());
owner = mp;
this.wrapped = wrapped;
}
示例8: canMoveUp
import net.minecraft.client.gui.ServerListEntryNormal; //导入依赖的package包/类
@Override
public boolean canMoveUp(ServerListEntryNormal p_175392_1_, int p_175392_2_)
{
return false;
}
示例9: canMoveDown
import net.minecraft.client.gui.ServerListEntryNormal; //导入依赖的package包/类
@Override
public boolean canMoveDown(ServerListEntryNormal p_175394_1_, int p_175394_2_)
{
return false;
}
示例10: getServerData
import net.minecraft.client.gui.ServerListEntryNormal; //导入依赖的package包/类
@Override
public ServerData getServerData(final ServerListEntryNormal entry) {
return entry.getServerData();
}
示例11: getServerData
import net.minecraft.client.gui.ServerListEntryNormal; //导入依赖的package包/类
@Override
public ServerData getServerData(final ServerListEntryNormal entry) {
return entry.func_148296_a();
}
示例12: enhanceServerListEntry
import net.minecraft.client.gui.ServerListEntryNormal; //导入依赖的package包/类
public String enhanceServerListEntry(ServerListEntryNormal serverListEntry, ServerData serverEntry, int x, int width, int y, int relativeMouseX, int relativeMouseY)
{
String tooltip;
int idx;
boolean blocked = false;
if (serverDataTag.containsKey(serverEntry))
{
ExtendedServerListData extendedData = serverDataTag.get(serverEntry);
if ("FML".equals(extendedData.type) && extendedData.isCompatible)
{
idx = 0;
tooltip = String.format("Compatible FML modded server\n%d mods present", extendedData.modData.size());
}
else if ("FML".equals(extendedData.type) && !extendedData.isCompatible)
{
idx = 16;
tooltip = String.format("Incompatible FML modded server\n%d mods present", extendedData.modData.size());
}
else if ("BUKKIT".equals(extendedData.type))
{
idx = 32;
tooltip = String.format("Bukkit modded server");
}
else if ("VANILLA".equals(extendedData.type))
{
idx = 48;
tooltip = String.format("Vanilla server");
}
else
{
idx = 64;
tooltip = String.format("Unknown server data");
}
blocked = extendedData.isBlocked;
}
else
{
return null;
}
this.client.getTextureManager().bindTexture(iconSheet);
Gui.drawModalRectWithCustomSizedTexture(x + width - 18, y + 10, 0, (float)idx, 16, 16, 256.0f, 256.0f);
if (blocked)
{
Gui.drawModalRectWithCustomSizedTexture(x + width - 18, y + 10, 0, 80, 16, 16, 256.0f, 256.0f);
}
return relativeMouseX > width - 15 && relativeMouseX < width && relativeMouseY > 10 && relativeMouseY < 26 ? tooltip : null;
}
示例13: enhanceServerListEntry
import net.minecraft.client.gui.ServerListEntryNormal; //导入依赖的package包/类
public String enhanceServerListEntry(ServerListEntryNormal serverListEntry, ServerData serverEntry, int x, int width, int y, int relativeMouseX, int relativeMouseY)
{
String tooltip;
int idx;
boolean blocked = false;
if (serverDataTag.containsKey(serverEntry))
{
ExtendedServerListData extendedData = serverDataTag.get(serverEntry);
if ("FML".equals(extendedData.type) && extendedData.isCompatible)
{
idx = 0;
tooltip = String.format("Compatible FML modded server\n%d mods present", extendedData.modData.size());
}
else if ("FML".equals(extendedData.type) && !extendedData.isCompatible)
{
idx = 16;
tooltip = String.format("Incompatible FML modded server\n%d mods present", extendedData.modData.size());
}
else if ("BUKKIT".equals(extendedData.type))
{
idx = 32;
tooltip = String.format("Bukkit modded server");
}
else if ("VANILLA".equals(extendedData.type))
{
idx = 48;
tooltip = String.format("Vanilla server");
}
else
{
idx = 64;
tooltip = String.format("Unknown server data");
}
blocked = extendedData.isBlocked;
}
else
{
return null;
}
this.client.func_110434_K().func_110577_a(iconSheet);
Gui.func_146110_a(x + width - 18, y + 10, 0, (float)idx, 16, 16, 256.0f, 256.0f);
if (blocked)
{
Gui.func_146110_a(x + width - 18, y + 10, 0, 80, 16, 16, 256.0f, 256.0f);
}
return relativeMouseX > width - 15 && relativeMouseX < width && relativeMouseY > 10 && relativeMouseY < 26 ? tooltip : null;
}
示例14: updateLastServerFromDirectConnect
import net.minecraft.client.gui.ServerListEntryNormal; //导入依赖的package包/类
public static void updateLastServerFromDirectConnect(GuiMultiplayer guiMultiplayer, ServerData serverData) {
currentServerIP = serverData.serverIP;
if (!currentServerIP.contains(":")) currentServerIP += ":25565";
lastServer = new ServerListEntryNormal(guiMultiplayer, serverData);
}
示例15: enhanceServerListEntry
import net.minecraft.client.gui.ServerListEntryNormal; //导入依赖的package包/类
public String enhanceServerListEntry(ServerListEntryNormal serverListEntry, ServerData serverEntry, int x, int width, int y, int relativeMouseX, int relativeMouseY)
{
String tooltip;
int idx;
boolean blocked = false;
if (serverDataTag.containsKey(serverEntry))
{
ExtendedServerListData extendedData = serverDataTag.get(serverEntry);
if ("FML".equals(extendedData.type) && extendedData.isCompatible)
{
idx = 0;
tooltip = String.format("Compatible FML modded server\n%d mods present", extendedData.modData.size());
}
else if ("FML".equals(extendedData.type) && !extendedData.isCompatible)
{
idx = 16;
tooltip = String.format("Incompatible FML modded server\n%d mods present", extendedData.modData.size());
}
else if ("BUKKIT".equals(extendedData.type))
{
idx = 32;
tooltip = String.format("Bukkit modded server");
}
else if ("VANILLA".equals(extendedData.type))
{
idx = 48;
tooltip = String.format("Vanilla server");
}
else
{
idx = 64;
tooltip = String.format("Unknown server data");
}
blocked = extendedData.isBlocked;
}
else
{
return null;
}
this.client.getTextureManager().bindTexture(iconSheet);
Gui.func_146110_a(x + width - 18, y + 10, 0, (float)idx, 16, 16, 256.0f, 256.0f);
if (blocked)
{
Gui.func_146110_a(x + width - 18, y + 10, 0, 80, 16, 16, 256.0f, 256.0f);
}
return relativeMouseX > width - 15 && relativeMouseX < width && relativeMouseY > 10 && relativeMouseY < 26 ? tooltip : null;
}