gt: 				value = pixelbot.getStrengthFromLeftArm();
context: package com.weebly.pixelbots.client.gui;
  
  import java.util.HashMap;
  
  import net.minecraft.client.Minecraft;
  import net.minecraft.client.gui.GuiButton;
  import net.minecraft.client.gui.inventory.GuiContainer;
  import net.minecraft.entity.player.InventoryPlayer;
  import net.minecraft.util.BlockPos;
  import net.minecraft.util.ResourceLocation;
  import net.minecraft.util.StatCollector;
  
  import com.weebly.pixelbots.Pixelbots;
  import com.weebly.pixelbots.container.ContainerRoboticCraftingStation;
  import com.weebly.pixelbots.database.Pixelbot;
  import com.weebly.pixelbots.message.MessageRoboticCraftingStation;
  import com.weebly.pixelbots.registry.PixelbotsItemRegistry;
  import com.weebly.pixelbots.registry.PixelbotsMessageRegistry;
  import com.weebly.pixelbots.tileentity.TileRoboticCraftingStation;
  
  public class GuiRoboticCraftingStation extends GuiContainer
  {
  	private static final ResourceLocation GUI_TEXTURE_INVENTORY = new ResourceLocation(Pixelbots.MODID, "/textures/gui/gui_robotic_crafting_station_1.png");
  	private static final ResourceLocation GUI_TEXTURE_SEARCH = new ResourceLocation(Pixelbots.MODID, "/textures/gui/gui_robotic_crafting_station_2.png");
  	private static final ResourceLocation GUI_TEXTURE_WIDGETS = new ResourceLocation(Pixelbots.MODID, "/textures/gui/gui_pixelbots_widgets.png");
  	private static final int FIRST_PAGE_OFFSET = 176;
  	private static final int LIST_SIZE = 5;
  
  	protected TileRoboticCraftingStation crafting_station;
  	protected int pageNumber;
  	protected int partType;
  	protected int partID;
  
  	public GuiRoboticCraftingStation(InventoryPlayer inventoryPlayer, TileRoboticCraftingStation tileEntity)
  	{
  		super(new ContainerRoboticCraftingStation(inventoryPlayer, tileEntity));
  		this.crafting_station = tileEntity;
  		this.xSize = this.FIRST_PAGE_OFFSET * 2;
  		this.ySize = 256;
  		this.pageNumber = 0;
  		this.partType = 0;
  		this.partID = 0;
  	}
  
  	@Override
  	public void initGui()
  	{
  		super.initGui();
  		this.buttonList.clear();
  		this.buttonList.add(new GuiButtonGeneric(0, this.guiLeft + 7, this.guiTop + 72, 0, 0, 10, 15, GUI_TEXTURE_WIDGETS));
  		((GuiButtonGeneric) this.buttonList.get(0)).enabled = this.pageNumber > 0;
  
  		this.buttonList.add(new GuiButtonGeneric(1, this.guiLeft + 159, this.guiTop + 72, 10, 0, 10, 15, GUI_TEXTURE_WIDGETS));
  		((GuiButtonGeneric) this.buttonList.get(1)).enabled = this.LIST_SIZE * this.pageNumber + this.LIST_SIZE < PixelbotsItemRegistry.pixelbotsInfo.size();
  
  		String button_name = StatCollector.translateToLocal("pixelbot.create.pixelpart");
  		int button_width = this.mc.fontRendererObj.getStringWidth(button_name) + 12;
  		this.buttonList.add(new GuiButton(2, this.guiLeft + (int) ((this.FIRST_PAGE_OFFSET - button_width) / 2), this.guiTop + 142, button_width, 20, button_name));
  		
  		this.buttonList.add(new GuiButtonPixelpart(3, this.guiLeft + this.FIRST_PAGE_OFFSET + 40, this.guiTop + 88, 50, 70, 50, 0, 50, 70, this.GUI_TEXTURE_WIDGETS, true));
  		this.buttonList.add(new GuiButtonPixelpart(4, this.guiLeft + this.FIRST_PAGE_OFFSET + 52, this.guiTop + 39, 26, 56, 100, 0, 26, 56, this.GUI_TEXTURE_WIDGETS, false));
  		this.buttonList.add(new GuiButtonPixelpart(5, this.guiLeft + this.FIRST_PAGE_OFFSET + 74, this.guiTop + 60, 30, 56, 126, 0, 30, 56, this.GUI_TEXTURE_WIDGETS, false));
  		this.buttonList.add(new GuiButtonPixelpart(6, this.guiLeft + this.FIRST_PAGE_OFFSET + 26, this.guiTop + 60, 30, 56, 156, 0, 30, 56, this.GUI_TEXTURE_WIDGETS, false));
  		
  		for (int button_id = 7; button_id < this.LIST_SIZE + 7; button_id++)
  			this.buttonList.add(new GuiButtonPixelbot(button_id, this.guiLeft + 20, this.guiTop + 38 + 20 * (button_id - 7), this.mc, PixelbotsItemRegistry.pixelbotsInfo.get(0).getName(), 0));
  		this.setPage();
  	}
  
  	@Override
  	public void onGuiClosed()
  	{
  		super.onGuiClosed();
  	}
  
  	@Override
  	public void updateScreen()
  	{
  		((GuiButton) this.buttonList.get(2)).enabled = this.crafting_station.canCraftPart(this.partType, this.partID);
  	}
  
  	@Override
  	public void actionPerformed(GuiButton button)
  	{
  		switch (button.id)
  		{
  			case 0:
  				if (this.pageNumber > 0)
  				{
  					this.pageNumber--;
  					this.partID = this.LIST_SIZE * this.pageNumber;
  					if (this.pageNumber <= 0)
  						((GuiButtonGeneric) this.buttonList.get(0)).enabled = false;
  					((GuiButtonGeneric) this.buttonList.get(1)).enabled = true;
  					this.setPage();
  				}
  				else
  					((GuiButtonGeneric) this.buttonList.get(0)).enabled = false;
  				break;
  			case 1:
  				if (this.LIST_SIZE * this.pageNumber + this.LIST_SIZE < PixelbotsItemRegistry.pixelbotsInfo.size())
  				{
  					this.pageNumber++;
  					this.partID = this.LIST_SIZE * this.pageNumber;
  					if (this.LIST_SIZE * this.pageNumber + this.LIST_SIZE >= PixelbotsItemRegistry.pixelbotsInfo.size())
  						((GuiButtonGeneric) this.buttonList.get(1)).enabled = false;
  					((GuiButtonGeneric) this.buttonList.get(0)).enabled = true;
  					this.setPage();
  				}
  				else
  					((GuiButtonGeneric) this.buttonList.get(1)).enabled = false;
  				break;
  			case 2:
  				if (this.crafting_station.canCraftPart(this.partType, this.partID))
  				{
  					BlockPos pos = this.crafting_station.getPos();
  					if (pos != null)
  						PixelbotsMessageRegistry.wrapper.sendToServer(new MessageRoboticCraftingStation(MessageRoboticCraftingStation.CRAFT_PART, this.partType, this.partID, pos.getX(), pos.getY(), pos.getZ()));
  				}
  				break;
  			case 3:
  				if (this.partType != 0 || ((GuiButtonPixelpart) this.buttonList.get(3)).selected)
  				{
  					((GuiButtonPixelpart) this.buttonList.get(3)).selected = true;
  					((GuiButtonPixelpart) this.buttonList.get(4)).selected = false;
  					((GuiButtonPixelpart) this.buttonList.get(5)).selected = false;
  					((GuiButtonPixelpart) this.buttonList.get(6)).selected = false;
  					this.partType = 0;
  				}
  				break;
  			case 4:
  				if (this.partType != 1 || ((GuiButtonPixelpart) this.buttonList.get(4)).selected)
  				{
  					((GuiButtonPixelpart) this.buttonList.get(3)).selected = false;
  					((GuiButtonPixelpart) this.buttonList.get(4)).selected = true;
  					((GuiButtonPixelpart) this.buttonList.get(5)).selected = false;
  					((GuiButtonPixelpart) this.buttonList.get(6)).selected = false;
  					this.partType = 1;
  				}
  				break;
  			case 5:
  				if (this.partType != 2 || ((GuiButtonPixelpart) this.buttonList.get(5)).selected)
  				{
  					((GuiButtonPixelpart) this.buttonList.get(3)).selected = false;
  					((GuiButtonPixelpart) this.buttonList.get(4)).selected = false;
  					((GuiButtonPixelpart) this.buttonList.get(5)).selected = true;
  					((GuiButtonPixelpart) this.buttonList.get(6)).selected = false;
  					this.partType = 2;
  				}
  				break;
  			case 6:
  				if (this.partType != 3 || ((GuiButtonPixelpart) this.buttonList.get(6)).selected)
  				{
  					((GuiButtonPixelpart) this.buttonList.get(3)).selected = false;
  					((GuiButtonPixelpart) this.buttonList.get(4)).selected = false;
  					((GuiButtonPixelpart) this.buttonList.get(5)).selected = false;
  					((GuiButtonPixelpart) this.buttonList.get(6)).selected = true;
  					this.partType = 3;
  				}
  				break;
  			default:
  				this.partID = ((GuiButtonPixelbot) this.buttonList.get(button.id)).pixelbot_id;
  				break;
  		}
  	}
  
  	@Override
  	protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3)
  	{
  		Minecraft.getMinecraft().getTextureManager().bindTexture(this.GUI_TEXTURE_SEARCH);
  		this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
  		Minecraft.getMinecraft().getTextureManager().bindTexture(this.GUI_TEXTURE_INVENTORY);
  		this.drawTexturedModalRect(this.FIRST_PAGE_OFFSET + this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
  	}
  
  	@Override
  	protected void drawGuiContainerForegroundLayer(int i, int j)
  	{
  		this.fontRendererObj.drawString(this.crafting_station.getName(), (this.xSize + this.FIRST_PAGE_OFFSET - this.fontRendererObj.getStringWidth(this.crafting_station.getName())) / 2, 6, 4210752);
  		Pixelbot pixelbot = this.getPixelbot(this.partID);
  		this.drawPage(this.partType);
  		this.drawPartStatus(pixelbot, this.partType);
  		this.drawResources(pixelbot, this.partType);
  	}
  
  	private void setPage()
  	{
  		HashMap<Integer, Pixelbot> pixelbots = PixelbotsItemRegistry.pixelbotsInfo;
  		int button_id = 7;
  		for (int id = this.LIST_SIZE * this.pageNumber; id < this.LIST_SIZE * this.pageNumber + this.LIST_SIZE; id++)
  		{
  			if (id < pixelbots.size())
  			{
  				Pixelbot pixelbot = pixelbots.get(id);
  				GuiButtonPixelbot button = (GuiButtonPixelbot) this.buttonList.get(button_id);
  				button.enabled = true;
  				button.visible = true;
  				button.setPixelbot(this.mc, StatCollector.translateToLocal("pixelbot.name." + pixelbot.getName()), pixelbot.getID());
  				button_id++;
  			}
  			else
  			{
  				Pixelbot pixelbot = pixelbots.get(0);
  				GuiButtonPixelbot button = (GuiButtonPixelbot) this.buttonList.get(button_id);
  				button.enabled = false;
  				button.visible = false;
  				button.setPixelbot(this.mc, StatCollector.translateToLocal("pixelbot.name." + pixelbot.getName()), pixelbot.getID());
  				button_id++;
  			}
  		}
  	}
  
  	private void drawPage(int part_type)
  	{
  		String stats_name = "none";
  		switch (part_type)
  		{
  			case 0:
  				stats_name = StatCollector.translateToLocal("pixelbot.legss");
  				this.fontRendererObj.drawString(stats_name, (this.FIRST_PAGE_OFFSET - this.fontRendererObj.getStringWidth(stats_name)) / 2, 18, 14737632);
  				break;
  			case 1:
  				stats_name = StatCollector.translateToLocal("pixelbot.heads");
  				this.fontRendererObj.drawString(stats_name, (this.FIRST_PAGE_OFFSET - this.fontRendererObj.getStringWidth(stats_name)) / 2, 18, 14737632);
  				break;
  			case 2:
  				stats_name = StatCollector.translateToLocal("pixelbot.left_arms");
  				this.fontRendererObj.drawString(stats_name, (this.FIRST_PAGE_OFFSET - this.fontRendererObj.getStringWidth(stats_name)) / 2, 18, 14737632);
  				break;
  			case 3:
  				stats_name = StatCollector.translateToLocal("pixelbot.right_arms");
  				this.fontRendererObj.drawString(stats_name, (this.FIRST_PAGE_OFFSET - this.fontRendererObj.getStringWidth(stats_name)) / 2, 18, 14737632);
  				break;
  		}
  	}
  
  	private void drawResources(Pixelbot pixelbot, int part_type)
  	{
  		int[] resources_required = null;
  		switch (part_type)
  		{
  			case 0:
  				resources_required = pixelbot.getResourcesForLegs();
  				break;
  			case 1:
  				resources_required = pixelbot.getResourcesForHead();
  				break;
  			case 2:
  				resources_required = pixelbot.getResourcesForLeftArm();
  				break;
  			case 3:
  				resources_required = pixelbot.getResourcesForRightArm();
  				break;
  		}
  		if (resources_required != null)
  			for (int i = 0; i < resources_required.length; i++)
  				this.fontRendererObj.drawString("/" + resources_required[i], 2 * this.FIRST_PAGE_OFFSET - 23, 61 + 22 * i, 4210752);
  	}
  
  	private void drawPartStatus(Pixelbot pixelbot, int part_type)
  	{
  		String stats_name = "none";
  		double value = 0;
  		switch (part_type)
  		{
  			case 0:
  				value = pixelbot.getArmorFromLegs();
  				stats_name = StatCollector.translateToLocal("pixelbot.armor") + " = " + value;
  				this.fontRendererObj.drawString(stats_name, (this.FIRST_PAGE_OFFSET - this.fontRendererObj.getStringWidth(stats_name)) / 2, 185, 14737632);
  				value = pixelbot.getStrengthFromLegs();
  				stats_name = StatCollector.translateToLocal("pixelbot.strength") + " = " + value;
  				this.fontRendererObj.drawString(stats_name, (this.FIRST_PAGE_OFFSET - this.fontRendererObj.getStringWidth(stats_name)) / 2, 200, 14737632);
  				value = pixelbot.getSpeedFromLegs();
  				stats_name = StatCollector.translateToLocal("pixelbot.speed") + " = " + value;
  				this.fontRendererObj.drawString(stats_name, (this.FIRST_PAGE_OFFSET - this.fontRendererObj.getStringWidth(stats_name)) / 2, 215, 14737632);
  				value = pixelbot.getKnockbackFromLegs();
  				stats_name = StatCollector.translateToLocal("pixelbot.knockback") + " = " + value;
  				this.fontRendererObj.drawString(stats_name, (this.FIRST_PAGE_OFFSET - this.fontRendererObj.getStringWidth(stats_name)) / 2, 230, 14737632);
  				stats_name = StatCollector.translateToLocal("pixelbot.name." + pixelbot.getName()) + " (" + StatCollector.translateToLocal("pixelbot.legs") + ")";
  				this.fontRendererObj.drawString(stats_name, (this.FIRST_PAGE_OFFSET - this.fontRendererObj.getStringWidth(stats_name)) / 2, 170, 14737632);
  				break;
  			case 1:
  				value = pixelbot.getArmorFromHead();
  				stats_name = StatCollector.translateToLocal("pixelbot.armor") + " = " + value;
  				this.fontRendererObj.drawString(stats_name, (this.FIRST_PAGE_OFFSET - this.fontRendererObj.getStringWidth(stats_name)) / 2, 185, 14737632);
  				value = pixelbot.getStrengthFromHead();
  				stats_name = StatCollector.translateToLocal("pixelbot.strength") + " = " + value;
  				this.fontRendererObj.drawString(stats_name, (this.FIRST_PAGE_OFFSET - this.fontRendererObj.getStringWidth(stats_name)) / 2, 200, 14737632);
  				value = pixelbot.getSpeedFromHead();
  				stats_name = StatCollector.translateToLocal("pixelbot.speed") + " = " + value;
  				this.fontRendererObj.drawString(stats_name, (this.FIRST_PAGE_OFFSET - this.fontRendererObj.getStringWidth(stats_name)) / 2, 215, 14737632);
  				value = pixelbot.getKnockbackFromHead();
  				stats_name = StatCollector.translateToLocal("pixelbot.knockback") + " = " + value;
  				this.fontRendererObj.drawString(stats_name, (this.FIRST_PAGE_OFFSET - this.fontRendererObj.getStringWidth(stats_name)) / 2, 230, 14737632);
  				stats_name = StatCollector.translateToLocal("pixelbot.name." + pixelbot.getName()) + " (" + StatCollector.translateToLocal("pixelbot.head") + ")";
  				this.fontRendererObj.drawString(stats_name, (this.FIRST_PAGE_OFFSET - this.fontRendererObj.getStringWidth(stats_name)) / 2, 170, 14737632);
  				break;
  			case 2:
  				value = pixelbot.getArmorFromLeftArm();
  				stats_name = StatCollector.translateToLocal("pixelbot.armor") + " = " + value;
  				this.fontRendererObj.drawString(stats_name, (this.FIRST_PAGE_OFFSET - this.fontRendererObj.getStringWidth(stats_name)) / 2, 185, 14737632);
  