本文整理汇总了Java中net.minecraft.client.gui.GuiListExtended.IGuiListEntry方法的典型用法代码示例。如果您正苦于以下问题:Java GuiListExtended.IGuiListEntry方法的具体用法?Java GuiListExtended.IGuiListEntry怎么用?Java GuiListExtended.IGuiListEntry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.gui.GuiListExtended
的用法示例。
在下文中一共展示了GuiListExtended.IGuiListEntry方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: GuiKeyBindingsListing
import net.minecraft.client.gui.GuiListExtended; //导入方法依赖的package包/类
public GuiKeyBindingsListing(GuiKeybindings controls, Minecraft mcIn) {
super(mcIn, controls.width + 45, controls.height, 63, controls.height - 32, 20);
this.mc = mcIn;
guiKeybindings = controls;
this.listEntries = new GuiListExtended.IGuiListEntry[MacroKey.instance.boundKeys.size()];
this.maxListLabelWidth = new int[MacroKey.instance.boundKeys.size()];
int i = 0;
for(BoundKey bind : MacroKey.instance.boundKeys){
this.listEntries[i] = new GuiKeyBindingsListing.KeyEntry(bind, i);
int j = mcIn.fontRenderer.getStringWidth(I18n.format(bind.getCommand(), new Object[0]));
if (j > this.maxListLabelWidth[i])
{
this.maxListLabelWidth[i] = j;
}
i++;
}
}
示例2: GuiLayerList
import net.minecraft.client.gui.GuiListExtended; //导入方法依赖的package包/类
public GuiLayerList(GuiManageLayers controls, Minecraft mcIn) {
super(mcIn, controls.width + 45, controls.height, 63, controls.height - 32, 20);
this.mc = mcIn;
this.parent = controls;
this.listEntries = new GuiListExtended.IGuiListEntry[MacroKey.instance.layers.size()];
this.maxListLabelWidth = new int[MacroKey.instance.layers.size()];
int i = 0;
for(Layer layer : MacroKey.instance.layers){
this.listEntries[i] = new GuiLayerList.KeyEntry(layer, i);
int j = mcIn.fontRenderer.getStringWidth(I18n.format(layer.getDisplayName(), new Object[0]));
if (j > this.maxListLabelWidth[i])
{
this.maxListLabelWidth[i] = j;
}
i++;
}
}
示例3: getListEntry
import net.minecraft.client.gui.GuiListExtended; //导入方法依赖的package包/类
/**
* Gets the IGuiListEntry object for the given index
*/
public GuiListExtended.IGuiListEntry getListEntry(int index)
{
if (index < this.slenList.size())
{
return (GuiListExtended.IGuiListEntry)this.slenList.get(index);
}
else
{
index = index - this.slenList.size();
if (index == 0)
{
return this.lanScanEntry;
}
else
{
--index;
return (GuiListExtended.IGuiListEntry)this.sleldList.get(index);
}
}
}
示例4: connectToSelected
import net.minecraft.client.gui.GuiListExtended; //导入方法依赖的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));
}
}
示例5: GuiMovementList
import net.minecraft.client.gui.GuiListExtended; //导入方法依赖的package包/类
public GuiMovementList(GuiConfig config, Minecraft mc) {
super(mc, config.width, config.height, 43, config.height - 32, 20);
this.config = config;
this.mc = mc;
Object[] aObject = ArrayUtils.clone(Util.getMovements());
this.listEntry = new GuiListExtended.IGuiListEntry[aObject.length];
int i = 0;
Object[] aObject1 = aObject;
int j = aObject.length;
for (int k = 0; k < j; ++k) {
Movement movement = (Movement) aObject1[k];
int l = mc.fontRenderer.getStringWidth(movement.getName());
if (l > this.lenghtName) {
this.lenghtName = l;
}
this.listEntry[i++] = new GuiMovementList.MovementEntry(movement);
}
}
示例6: getListEntry
import net.minecraft.client.gui.GuiListExtended; //导入方法依赖的package包/类
@Override
public GuiListExtended.IGuiListEntry getListEntry(int index)
{
return super.getListEntry(index);
}
示例7: GuiKeyBindingsListing
import net.minecraft.client.gui.GuiListExtended; //导入方法依赖的package包/类
public GuiKeyBindingsListing(GuiManageKeybindings controls, Minecraft mcIn, Layer layer) {
super(mcIn, controls.width + 45, controls.height, 63, controls.height - 32, 20);
this.mc = mcIn;
this.guiKeybindings = controls;
boundKeyList = MacroKey.instance.boundKeys;
if(layer==null){
isMaster=true;
}else{
isMaster=false;
this.currentLayer=layer;
/*boundKeyList = new ArrayList<BoundKey>();
for (Layer layer1 : MacroKey.instance.layers) {
if(layer1 == layer){
for (UUID uuid:layer.getBoundKeyList()) {
boundKeyList.add(BoundKey.getKeyfromUUID(uuid));
}
}
}*/
}
this.listEntries = new GuiListExtended.IGuiListEntry[boundKeyList.size()];
this.maxListLabelWidth = new int[boundKeyList.size()];
int i = 0;
for(BoundKey bind : boundKeyList){
this.listEntries[i] = new GuiKeyBindingsListing.KeyEntry(bind, i);
int j = mcIn.fontRenderer.getStringWidth(I18n.format(bind.getCommand(), new Object[0]));
if (j > this.maxListLabelWidth[i])
{
this.maxListLabelWidth[i] = j;
}
i++;
}
}
示例8: getListEntry
import net.minecraft.client.gui.GuiListExtended; //导入方法依赖的package包/类
@Override
public GuiListExtended.IGuiListEntry getListEntry(int entry) {
return entries.get(entry);
}
示例9: GuiSnitchList
import net.minecraft.client.gui.GuiListExtended; //导入方法依赖的package包/类
public GuiSnitchList(GuiEditSnitches guiSnitches, Minecraft mc) {
super(mc,
guiSnitches.width, // width
guiSnitches.height, // height
32, // top
guiSnitches.height - 32, // bottom
20); // slot size
this.guiSnitches = guiSnitches;
this.mc = mc;
int listSize = SV.instance.snitchList.size(); // TODO: replace with method
this.iGuiList = new GuiListExtended.IGuiListEntry[listSize];
int i = 0;
this.nameWidth = 1;
this.ctGroupWidth = mc.fontRendererObj.getStringWidth("WWWWWWWWWWWWWWWWWWWW ");
this.worldWidth = mc.fontRendererObj.getStringWidth("WWWWWWWWWWW ");
this.coordWidth = mc.fontRendererObj.getStringWidth("-9999 ");
this.nameSpace = this.width - this.coordWidth * 3 - this.worldWidth - this.ctGroupWidth - 100;
this.entryWidth = 1;
for (int k = 0; k < listSize; ++k) {
Snitch snitch = SV.instance.snitchList.get(k);
int l = mc.fontRendererObj.getStringWidth(snitch.getCtGroup() + " ");
if (l > this.ctGroupWidth) {
this.ctGroupWidth = l;
}
l = mc.fontRendererObj.getStringWidth(snitch.getName() + " ");
if (l > this.nameWidth) {
this.nameWidth = l;
}
l = mc.fontRendererObj.getStringWidth(snitch.getWorld() + " ");
if (l > this.worldWidth) {
this.worldWidth = l;
}
l = this.coordWidth * 3 + this.ctGroupWidth + this.nameWidth + this.worldWidth;
if (l > this.entryWidth) {
this.entryWidth = l;
}
this.iGuiList[i++] = new GuiSnitchList.ListEntry(snitch);
}
if (this.nameWidth > this.nameSpace) {
this.nameWidth = this.nameSpace;
}
if (this.ctGroupWidth > this.nameSpace) {
this.ctGroupWidth = this.nameSpace;
}
this.setHasListHeader(true, (int) ( (float) GuiSnitchList.this.mc.fontRendererObj.FONT_HEIGHT * 1.5));
}
示例10: getListEntry
import net.minecraft.client.gui.GuiListExtended; //导入方法依赖的package包/类
/**
* Gets the IGuiListEntry object for the given index
*/
public GuiListExtended.IGuiListEntry getListEntry(int index) {
return this.iGuiList[index];
}
示例11: getListEntry
import net.minecraft.client.gui.GuiListExtended; //导入方法依赖的package包/类
@Override
@Nonnull
public GuiListExtended.IGuiListEntry getListEntry(int index) {
return list.get(index);
}
示例12: getListEntry
import net.minecraft.client.gui.GuiListExtended; //导入方法依赖的package包/类
/**
* Gets the IGuiListEntry object for the given index
*/
public GuiListExtended.IGuiListEntry getListEntry(int slot) {
return this.listEntry[slot];
}