Skip to content

Commit

Permalink
Update StencilTableGui.java
Browse files Browse the repository at this point in the history
  • Loading branch information
TheVikingWarrior committed Dec 1, 2013
1 parent f708118 commit ea218c6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/main/java/tconstruct/client/gui/StencilTableGui.java
Expand Up @@ -16,8 +16,8 @@

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
Expand Down Expand Up @@ -70,8 +70,8 @@ public void initGui ()
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++)
//{
Expand All @@ -85,7 +85,7 @@ public void initGui ()
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)
Expand All @@ -95,24 +95,24 @@ protected void actionPerformed (GuiButton button)
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);
}*/
Expand Down

0 comments on commit ea218c6

Please sign in to comment.