mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-21 04:32:26 +00:00
more fixes
This commit is contained in:
1 parent
eba66e0182
commit
fb04e8eb08
55 files changed
+1446
-1442
No files matched your search
@@ -36,17 +36,17 @@ public class ArmorExtendedGui extends InventoryEffectRenderer
|
||||
super.initGui();
|
||||
|
||||
int cornerX = guiLeft;
|
||||
int cornerY = (this.height - this.ySize) / 2;
|
||||
this.buttonList.clear();
|
||||
int cornerY = (this.field_146294_l - this.ySize) / 2;
|
||||
this.field_146292_n.clear();
|
||||
|
||||
// InventoryTab tab = new InventoryTab(2, cornerX, cornerY - 28, new ItemStack(Block.workbench), 0);
|
||||
// this.buttonList.add(tab);
|
||||
// this.field_146292_n.add(tab);
|
||||
// tab = new InventoryTab(3, cornerX + 28, cornerY - 28, new ItemStack(Item.plateDiamond), 1);
|
||||
// tab.enabled = false;
|
||||
// this.buttonList.add(tab);
|
||||
// this.field_146292_n.add(tab);
|
||||
|
||||
TabRegistry.updateTabValues(cornerX, cornerY, InventoryTabArmorExtended.class);
|
||||
TabRegistry.addTabsToList(this.buttonList);
|
||||
TabRegistry.addTabsToList(this.field_146292_n);
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer (int par1, int par2)
|
||||
@@ -62,19 +62,19 @@ public class ArmorExtendedGui extends InventoryEffectRenderer
|
||||
this.ySize_lo = (float) par2;
|
||||
// if (stats.inventory[2] != null && stats.inventory[2].getItem() == TContent.knapsack)
|
||||
// {
|
||||
// if (this.buttonList.size() < 3)
|
||||
// if (this.field_146292_n.size() < 3)
|
||||
// {
|
||||
// int cornerX = guiLeft;
|
||||
// int cornerY = (this.height - this.ySize) / 2;
|
||||
// InventoryTab tab = new InventoryTab(4, cornerX + 56, cornerY - 28, new ItemStack(TContent.knapsack), 1);
|
||||
// this.buttonList.add(tab);
|
||||
// this.field_146292_n.add(tab);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (this.buttonList.size() >= 3)
|
||||
// if (this.field_146292_n.size() >= 3)
|
||||
// {
|
||||
// buttonList.remove(2);
|
||||
// field_146292_n.remove(2);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
@@ -87,7 +87,7 @@ public class ArmorExtendedGui extends InventoryEffectRenderer
|
||||
//mc.renderEngine.bindTexture("/mods/tinker/textures/gui/armorextended.png");
|
||||
this.field_146297_k.getTextureManager().bindTexture(background);
|
||||
int cornerX = guiLeft;
|
||||
int cornerY = (height - ySize) / 2;
|
||||
int cornerY = (field_146294_l - ySize) / 2;
|
||||
drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize);
|
||||
|
||||
if (!stats.isStackInSlot(0))
|
||||
|
||||
@@ -27,19 +27,19 @@ public class KnapsackGui extends GuiContainer
|
||||
super.initGui();
|
||||
|
||||
int cornerX = guiLeft;
|
||||
int cornerY = (this.height - this.ySize) / 2;
|
||||
this.buttonList.clear();
|
||||
int cornerY = (this.field_146294_l - this.ySize) / 2;
|
||||
this.field_146292_n.clear();
|
||||
|
||||
TabRegistry.updateTabValues(cornerX, cornerY, InventoryTabKnapsack.class);
|
||||
TabRegistry.addTabsToList(this.buttonList);
|
||||
TabRegistry.addTabsToList(this.field_146292_n);
|
||||
|
||||
// InventoryTab tab = new InventoryTab(2, cornerX, cornerY - 28, new ItemStack(Block.workbench), 0);
|
||||
// this.buttonList.add(tab);
|
||||
// this.field_146292_n.add(tab);
|
||||
// tab = new InventoryTab(3, cornerX + 28, cornerY - 28, new ItemStack(Item.plateDiamond), 1);
|
||||
// this.buttonList.add(tab);
|
||||
// this.field_146292_n.add(tab);
|
||||
// tab = new InventoryTab(4, cornerX + 56, cornerY - 28, new ItemStack(TContent.knapsack), 1);
|
||||
// tab.enabled = false;
|
||||
// this.buttonList.add(tab);
|
||||
// this.field_146292_n.add(tab);
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer (int par1, int par2)
|
||||
@@ -55,7 +55,7 @@ public class KnapsackGui extends GuiContainer
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.field_146297_k.getTextureManager().bindTexture(background);
|
||||
int cornerX = guiLeft;
|
||||
int cornerY = (height - ySize) / 2;
|
||||
int cornerY = (field_146294_l - ySize) / 2;
|
||||
drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize);
|
||||
}
|
||||
|
||||
|
||||
@@ -66,20 +66,20 @@ public class StencilTableGui extends GuiContainer
|
||||
int cornerX = (this.field_146294_l - this.xSize) / 2;
|
||||
int cornerY = (this.field_146295_m - this.ySize) / 2;
|
||||
|
||||
this.buttonList.clear();
|
||||
this.field_146292_n.clear();
|
||||
/*ToolGuiElement repair = TConstruct.toolButtons.get(0);
|
||||
GuiButtonTool repairButton = new GuiButtonTool(0, cornerX - 110, cornerY, repair.buttonIconX, repair.buttonIconY, repair.texture); // Repair
|
||||
repairButton.enabled = false;
|
||||
this.buttonList.add(repairButton);*/
|
||||
this.buttonList.add(new GuiButton(0, cornerX - 120, cornerY, 120, 20, StatCollector.translateToLocal("gui.stenciltable1")));
|
||||
this.buttonList.add(new GuiButton(1, cornerX - 120, cornerY + 20, 120, 20, StatCollector.translateToLocal("gui.stenciltable1")));
|
||||
this.field_146292_n.add(repairButton);*/
|
||||
this.field_146292_n.add(new GuiButton(0, cornerX - 120, cornerY, 120, 20, StatCollector.translateToLocal("gui.stenciltable1")));
|
||||
this.field_146292_n.add(new GuiButton(1, cornerX - 120, cornerY + 20, 120, 20, StatCollector.translateToLocal("gui.stenciltable1")));
|
||||
|
||||
//for (int iter = 0; iter < TConstructContent.patternOutputs.length; iter++)
|
||||
//{
|
||||
|
||||
/*ToolGuiElement element = TConstruct.toolButtons.get(iter);
|
||||
GuiButtonTool button = new GuiButtonTool(iter, cornerX - 110 + 22 * (iter % 5), cornerY + 22 * (iter / 5), element.buttonIconX, element.buttonIconY, element.texture); // Repair
|
||||
this.buttonList.add(button);*/
|
||||
this.field_146292_n.add(button);*/
|
||||
//}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ public class StencilTableGui extends GuiContainer
|
||||
int meta = pattern.getItemDamage();
|
||||
if (meta == 0)
|
||||
{
|
||||
if (button.id == 0)
|
||||
if (button.field_146127_k == 0)
|
||||
{
|
||||
patternIndex++;
|
||||
if (patternIndex == 21)
|
||||
@@ -99,7 +99,7 @@ public class StencilTableGui extends GuiContainer
|
||||
if (patternIndex >= TRepo.patternOutputs.length - 1)
|
||||
patternIndex = 0;
|
||||
}
|
||||
else if (button.id == 1)
|
||||
else if (button.field_146127_k == 1)
|
||||
{
|
||||
patternIndex--;
|
||||
if (patternIndex < 0)
|
||||
|
||||
@@ -39,11 +39,11 @@ public class ToolForgeGui extends ToolStationGui
|
||||
int cornerX = (this.field_146294_l - this.xSize) / 2;
|
||||
int cornerY = (this.field_146295_m - this.ySize) / 2;
|
||||
|
||||
this.buttonList.clear();
|
||||
this.field_146292_n.clear();
|
||||
ToolGuiElement repair = TConstructClientRegistry.toolButtons.get(0);
|
||||
GuiButtonTool repairButton = new GuiButtonTool(0, cornerX - 110, cornerY, repair.buttonIconX, repair.buttonIconY, repair.domain, repair.texture, repair); // Repair
|
||||
repairButton.enabled = false;
|
||||
this.buttonList.add(repairButton);
|
||||
repairButton.field_146124_l = false;
|
||||
this.field_146292_n.add(repairButton);
|
||||
int offset = TConstructClientRegistry.tierTwoButtons.size();
|
||||
|
||||
for (int iter = 0; iter < TConstructClientRegistry.tierTwoButtons.size(); iter++)
|
||||
@@ -51,7 +51,7 @@ public class ToolForgeGui extends ToolStationGui
|
||||
ToolGuiElement element = TConstructClientRegistry.tierTwoButtons.get(iter);
|
||||
GuiButtonTool button = new GuiButtonTool(iter + 1, cornerX - 110 + 22 * ((iter + 1) % 5), cornerY + 22 * ((iter + 1) / 5), element.buttonIconX, element.buttonIconY, repair.domain,
|
||||
element.texture, element);
|
||||
this.buttonList.add(button);
|
||||
this.field_146292_n.add(button);
|
||||
}
|
||||
|
||||
for (int iter = 1; iter < TConstructClientRegistry.toolButtons.size(); iter++)
|
||||
@@ -59,16 +59,16 @@ public class ToolForgeGui extends ToolStationGui
|
||||
ToolGuiElement element = TConstructClientRegistry.toolButtons.get(iter);
|
||||
GuiButtonTool button = new GuiButtonTool(iter + offset, cornerX - 110 + 22 * ((iter + offset) % 5), cornerY + 22 * ((iter + offset) / 5), element.buttonIconX, element.buttonIconY,
|
||||
repair.domain, element.texture, element);
|
||||
this.buttonList.add(button);
|
||||
this.field_146292_n.add(button);
|
||||
}
|
||||
}
|
||||
|
||||
protected void actionPerformed (GuiButton button)
|
||||
{
|
||||
GuiButtonTool b = (GuiButtonTool) button;
|
||||
((GuiButton) this.buttonList.get(selectedButton)).enabled = true;
|
||||
selectedButton = button.id;
|
||||
button.enabled = false;
|
||||
((GuiButton) this.field_146292_n.get(selectedButton)).field_146124_l = true;
|
||||
selectedButton = button.field_146127_k;
|
||||
button.field_146124_l = false;
|
||||
|
||||
setSlotType(b.element.slotType);
|
||||
iconX = b.element.iconsX;
|
||||
|
||||
@@ -90,26 +90,26 @@ public class ToolStationGui extends NewContainerGui
|
||||
int cornerX = (this.field_146294_l - this.xSize) / 2;
|
||||
int cornerY = (this.field_146295_m - this.ySize) / 2;
|
||||
|
||||
this.buttonList.clear();
|
||||
this.field_146292_n.clear();
|
||||
ToolGuiElement repair = TConstructClientRegistry.toolButtons.get(0);
|
||||
GuiButtonTool repairButton = new GuiButtonTool(0, cornerX - 110, cornerY, repair.buttonIconX, repair.buttonIconY, repair.domain, repair.texture, repair); // Repair
|
||||
repairButton.enabled = false;
|
||||
this.buttonList.add(repairButton);
|
||||
repairButton.field_146124_l = false;
|
||||
this.field_146292_n.add(repairButton);
|
||||
|
||||
for (int iter = 1; iter < TConstructClientRegistry.toolButtons.size(); iter++)
|
||||
{
|
||||
ToolGuiElement element = TConstructClientRegistry.toolButtons.get(iter);
|
||||
GuiButtonTool button = new GuiButtonTool(iter, cornerX - 110 + 22 * (iter % 5), cornerY + 22 * (iter / 5), element.buttonIconX, element.buttonIconY, repair.domain, element.texture,
|
||||
element);
|
||||
this.buttonList.add(button);
|
||||
this.field_146292_n.add(button);
|
||||
}
|
||||
}
|
||||
|
||||
protected void actionPerformed (GuiButton button)
|
||||
{
|
||||
((GuiButton) this.buttonList.get(guiType)).enabled = true;
|
||||
guiType = button.id;
|
||||
button.enabled = false;
|
||||
((GuiButton) this.field_146292_n.get(guiType)).field_146124_l = true;
|
||||
guiType = button.field_146127_k;
|
||||
button.field_146124_l = false;
|
||||
|
||||
ToolGuiElement element = TConstructClientRegistry.toolButtons.get(guiType);
|
||||
setSlotType(element.slotType);
|
||||
|
||||
Reference in new issue
Block a user