mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-24 22:14:31 +00:00
run through remap script
This commit is contained in:
1 parent
689aeba09b
commit
b8cf7cdc5e
208 files changed
+4117
-4117
No files matched your search
@@ -22,26 +22,26 @@ public abstract class AbstractTab extends GuiButton
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_146112_a (Minecraft mc, int mouseX, int mouseY)
|
||||
public void drawButton (Minecraft mc, int mouseX, int mouseY)
|
||||
{
|
||||
if (this.field_146125_m)
|
||||
if (this.visible)
|
||||
{
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
int yTexPos = this.field_146124_l ? 0 : 32;
|
||||
int ySize = this.field_146124_l ? 28 : 32;
|
||||
int xOffset = this.field_146127_k == 2 ? 0 : 1;
|
||||
int yTexPos = this.enabled ? 0 : 32;
|
||||
int ySize = this.enabled ? 28 : 32;
|
||||
int xOffset = this.id == 2 ? 0 : 1;
|
||||
|
||||
mc.renderEngine.bindTexture(this.texture);
|
||||
this.drawTexturedModalRect(this.field_146128_h, this.field_146129_i, xOffset * 28, yTexPos, 28, ySize);
|
||||
this.drawTexturedModalRect(this.xPosition, this.yPosition, xOffset * 28, yTexPos, 28, ySize);
|
||||
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
this.zLevel = 100.0F;
|
||||
this.itemRenderer.zLevel = 100.0F;
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
this.itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.renderEngine, renderStack, field_146128_h + 6, field_146129_i + 8);
|
||||
this.itemRenderer.renderItemOverlayIntoGUI(mc.fontRenderer, mc.renderEngine, renderStack, field_146128_h + 6, field_146129_i + 8);
|
||||
this.itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.renderEngine, renderStack, xPosition + 6, yPosition + 8);
|
||||
this.itemRenderer.renderItemOverlayIntoGUI(mc.fontRenderer, mc.renderEngine, renderStack, xPosition + 6, yPosition + 8);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
this.itemRenderer.zLevel = 0.0F;
|
||||
this.zLevel = 0.0F;
|
||||
@@ -50,9 +50,9 @@ public abstract class AbstractTab extends GuiButton
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean func_146116_c (Minecraft mc, int mouseX, int mouseY)
|
||||
public boolean mousePressed (Minecraft mc, int mouseX, int mouseY)
|
||||
{
|
||||
boolean inWindow = this.field_146124_l && this.field_146125_m && mouseX >= this.field_146128_h && mouseY >= this.field_146129_i && mouseX < this.field_146128_h + this.field_146120_f && mouseY < this.field_146129_i + this.field_146121_g;
|
||||
boolean inWindow = this.enabled && this.visible && mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height;
|
||||
|
||||
if (inWindow)
|
||||
{
|
||||
|
||||
@@ -28,12 +28,12 @@ public class TabRegistry
|
||||
if (gui.getClass() == GuiInventory.class)
|
||||
{
|
||||
//Values are public at runtime.
|
||||
int cornerX = gui.field_146999_f;
|
||||
int cornerY = gui.field_147009_r;
|
||||
gui.field_146292_n.clear();
|
||||
int cornerX = gui.xSize;
|
||||
int cornerY = gui.guiTop;
|
||||
gui.buttonList.clear();
|
||||
|
||||
updateTabValues(cornerX, cornerY, InventoryTabVanilla.class);
|
||||
addTabsToList(gui.field_146292_n);
|
||||
addTabsToList(gui.buttonList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public class TabRegistry
|
||||
public static void openInventoryGui ()
|
||||
{
|
||||
GuiInventory inventory = new GuiInventory(mc.thePlayer);
|
||||
mc.func_147108_a(inventory);
|
||||
mc.displayGuiScreen(inventory);
|
||||
TabRegistry.addTabsToInventory(inventory);
|
||||
}
|
||||
|
||||
@@ -55,22 +55,22 @@ public class TabRegistry
|
||||
|
||||
if (t.shouldAddToList())
|
||||
{
|
||||
t.field_146127_k = count;
|
||||
t.field_146128_h = cornerX + (count - 2) * 28;
|
||||
t.field_146129_i = cornerY - 28;
|
||||
t.field_146124_l = !t.getClass().equals(selectedButton);
|
||||
t.id = count;
|
||||
t.xPosition = cornerX + (count - 2) * 28;
|
||||
t.yPosition = cornerY - 28;
|
||||
t.enabled = !t.getClass().equals(selectedButton);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void addTabsToList (List field_146292_n)
|
||||
public static void addTabsToList (List buttonList)
|
||||
{
|
||||
for (AbstractTab tab : tabList)
|
||||
{
|
||||
if (tab.shouldAddToList())
|
||||
{
|
||||
field_146292_n.add(tab);
|
||||
buttonList.add(tab);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user