protected void drawGuiContainerBackgroundLayer (float par1, int par2, int par3)
 {
     GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
     this.mc.getTextureManager().bindTexture(background);
     int cornerX = (this.width - this.xSize) / 2;
     int cornerY = (this.height - this.ySize) / 2;
     this.drawTexturedModalRect(cornerX, cornerY, 0, 0, this.xSize, this.ySize);
     if (!logic.isStackInSlot(0))
     {
         this.drawTexturedModalRect(cornerX + 47, cornerY + 34, 176, 0, 18, 18);
     }
 }
 protected void actionPerformed (GuiButton button)
 {
     ItemStack pattern = logic.getStackInSlot(0);
     if (pattern != null && pattern.getItem() == TContent.blankPattern)
     {
         int meta = pattern.getItemDamage();
         if (meta == 0)
         {
             if (button.id == 0)
             {
                 patternIndex++;
                 if (patternIndex == 21)
                     patternIndex++;
                 if (patternIndex >= TContent.patternOutputs.length - 1)
                     patternIndex = 0;
             }
             else if (button.id == 1)
             {
                 patternIndex--;
                 if (patternIndex < 0)
                     patternIndex = TContent.patternOutputs.length - 2;
                 if (patternIndex == 21)
                     patternIndex--;
             }
             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(TContent.metalPattern, 1, 0);
             logic.setInventorySlotContents(1, stack);
             updateServer(stack);
         }*/
     }
 }