mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-17 11:05:40 +00:00
Merge branch 'master' into 1.8.8
This commit is contained in:
commit
84c3ef0f5c
9 files changed
+49
-132
No files matched your search
@@ -137,7 +137,7 @@ public class BiomeManager
|
||||
public static ImmutableList<BiomeEntry> getBiomes(BiomeType type)
|
||||
{
|
||||
int idx = type.ordinal();
|
||||
List<BiomeEntry> list = idx > biomes.length ? null : biomes[idx];
|
||||
List<BiomeEntry> list = idx >= biomes.length ? null : biomes[idx];
|
||||
|
||||
return list != null ? ImmutableList.copyOf(list) : null;
|
||||
}
|
||||
@@ -169,7 +169,7 @@ public class BiomeManager
|
||||
|
||||
if (ret.ordinal() >= biomes.length)
|
||||
{
|
||||
biomes = Arrays.copyOf(biomes, ret.ordinal());
|
||||
biomes = Arrays.copyOf(biomes, ret.ordinal() + 1);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -710,7 +710,7 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
|
||||
public void showInGameModOptions(GuiIngameMenu guiIngameMenu)
|
||||
{
|
||||
showGuiScreen(new GuiIngameModOptions(guiIngameMenu));
|
||||
showGuiScreen(new GuiModList(guiIngameMenu));
|
||||
}
|
||||
|
||||
public IModGuiFactory getGuiFactoryFor(ModContainer selectedMod)
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
package net.minecraftforge.fml.client;
|
||||
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
|
||||
public class GuiIngameModOptions extends GuiScreen
|
||||
{
|
||||
private final GuiScreen parentScreen;
|
||||
protected String title = "Mod Options";
|
||||
private GuiModOptionList optionList;
|
||||
|
||||
public GuiIngameModOptions(GuiScreen parentScreen)
|
||||
{
|
||||
this.parentScreen = parentScreen;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui()
|
||||
{
|
||||
this.optionList=new GuiModOptionList(this);
|
||||
//this.optionList.registerScrollButtons(this.buttonList, 7, 8);
|
||||
this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, I18n.format("gui.done", new Object[0])));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton button)
|
||||
{
|
||||
if (button.enabled)
|
||||
{
|
||||
if (button.id == 200)
|
||||
{
|
||||
this.mc.gameSettings.saveOptions();
|
||||
this.mc.displayGuiScreen(this.parentScreen);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks)
|
||||
{
|
||||
// force a non-transparent background
|
||||
this.drawDefaultBackground();
|
||||
this.optionList.drawScreen(mouseX, mouseY, partialTicks);
|
||||
this.drawCenteredString(this.fontRendererObj, this.title, this.width / 2, 15, 0xFFFFFF);
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
}
|
||||
|
||||
FontRenderer getFontRenderer() {
|
||||
return fontRendererObj;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -579,7 +579,6 @@ public class GuiModList extends GuiScreen
|
||||
k += GuiModList.this.fontRendererObj.getStringWidth(((ChatComponentText)part).getChatComponentText_TextValue());
|
||||
if (k >= x)
|
||||
{
|
||||
System.out.println(part);
|
||||
GuiModList.this.func_175276_a(part);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
package net.minecraftforge.fml.client;
|
||||
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
|
||||
public class GuiModOptionList extends GuiScrollingList {
|
||||
|
||||
private GuiIngameModOptions parent;
|
||||
|
||||
public GuiModOptionList(GuiIngameModOptions parent)
|
||||
{
|
||||
super(parent.mc, 150, parent.height, 32, parent.height - 65 + 4, 10, 35, parent.width, parent.height);
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getSize()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void elementClicked(int index, boolean doubleClick)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isSelected(int index)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawBackground()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawSlot(int slotIdx, int entryRight, int slotTop, int slotBuffer, Tessellator tess)
|
||||
{
|
||||
this.parent.getFontRenderer().drawString(this.parent.getFontRenderer().trimStringToWidth("Test 1", listWidth - 10), this.left + 3 , slotTop + 2, 0xFF2222);
|
||||
this.parent.getFontRenderer().drawString(this.parent.getFontRenderer().trimStringToWidth("TEST 2", listWidth - 10), this.left + 3 , slotTop + 12, 0xFF2222);
|
||||
this.parent.getFontRenderer().drawString(this.parent.getFontRenderer().trimStringToWidth("DISABLED", listWidth - 10), this.left + 3 , slotTop + 22, 0xFF2222);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user