package minefantasy.client.gui;
import minefantasy.block.tileentity.TileEntityWeaponRack;
import minefantasy.client.TextureHelperMF;
import minefantasy.container.ContainerRack;
import minefantasy.system.data_minefantasy;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.StatCollector;
import org.lwjgl.opengl.GL11;
/**
*
* @author Anonymous Productions
*
* Sources are provided for educational reasons.
* though small bits of code, or methods can be used in your own creations.
*/
public class GuiRack extends GuiContainer
{
private TileEntityWeaponRack furnaceInventory;
public GuiRack(InventoryPlayer inventoryplayer, TileEntityWeaponRack tile)
{
super(new ContainerRack(inventoryplayer, tile));
furnaceInventory = tile;
}
protected void drawGuiContainerForegroundLayer()
{
fontRenderer.drawString(StatCollector.translateToLocal("tile.weaponRack.name"), 60, 6, 0x404040);
fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, (ySize - 96) + 2, 0x404040);
}
protected void drawGuiContainerBackgroundLayer(float f, int i, int j)
{
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
bindTexture(data_minefantasy.image("/gui/Rack.png"));
int l = (width - xSize) / 2;
int i1 = (height - ySize) / 2;
drawTexturedModalRect(l, i1, 0, 0, xSize, ySize);
}
private void bindTexture(String image)
{
this.mc.renderEngine.bindTexture(TextureHelperMF.getResource(image));
}
}