Update StencilTableGui.java

This commit is contained in:
TheVikingWarrior committed 2013-12-01 20:40:42 +01:00
1 parent f7081180d3
commit ea218c6099
1 file changed
+8 -8
@@ -16,8 +16,8 @@ import org.lwjgl.opengl.GL11;
import tconstruct.blocks.logic.StencilTableLogic;
import tconstruct.common.TContent;
import tconstruct.common.TRepo;
import tconstruct.inventory.PatternShaperContainer;
import cpw.mods.fml.common.network.PacketDispatcher;
public class StencilTableGui extends GuiContainer
@@ -70,8 +70,8 @@ public class StencilTableGui extends GuiContainer
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, "Next Pattern"));
this.buttonList.add(new GuiButton(1, cornerX - 120, cornerY + 20, 120, 20, "Previous Pattern"));
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")));
//for (int iter = 0; iter < TConstructContent.patternOutputs.length; iter++)
//{
@@ -85,7 +85,7 @@ public class StencilTableGui extends GuiContainer
protected void actionPerformed (GuiButton button)
{
ItemStack pattern = logic.getStackInSlot(0);
if (pattern != null && pattern.getItem() == TRepo.blankPattern)
if (pattern != null && pattern.getItem() == TContent.blankPattern)
{
int meta = pattern.getItemDamage();
if (meta == 0)
@@ -95,24 +95,24 @@ public class StencilTableGui extends GuiContainer
patternIndex++;
if (patternIndex == 21)
patternIndex++;
if (patternIndex >= TRepo.patternOutputs.length - 1)
if (patternIndex >= TContent.patternOutputs.length - 1)
patternIndex = 0;
}
else if (button.id == 1)
{
patternIndex--;
if (patternIndex < 0)
patternIndex = TRepo.patternOutputs.length - 2;
patternIndex = TContent.patternOutputs.length - 2;
if (patternIndex == 21)
patternIndex--;
}
ItemStack stack = new ItemStack(TRepo.woodPattern, 1, patternIndex + 1);
ItemStack stack = new ItemStack(TContent.woodPattern, 1, patternIndex + 1);
logic.setInventorySlotContents(1, stack);
updateServer(stack);
}
/*else if (meta == 1 || meta == 2)
{
ItemStack stack = new ItemStack(TRepo.metalPattern, 1, 0);
ItemStack stack = new ItemStack(TContent.metalPattern, 1, 0);
logic.setInventorySlotContents(1, stack);
updateServer(stack);
}*/