001package net.minecraft.client.gui;
002
003import cpw.mods.fml.relauncher.Side;
004import cpw.mods.fml.relauncher.SideOnly;
005import net.minecraft.client.gui.inventory.GuiContainer;
006import net.minecraft.entity.player.InventoryPlayer;
007import net.minecraft.inventory.ContainerHopper;
008import net.minecraft.inventory.IInventory;
009import net.minecraft.util.StatCollector;
010import org.lwjgl.opengl.GL11;
011
012@SideOnly(Side.CLIENT)
013public class GuiHopper extends GuiContainer
014{
015    private IInventory field_94081_r;
016    private IInventory field_94080_s;
017
018    public GuiHopper(InventoryPlayer par1InventoryPlayer, IInventory par2IInventory)
019    {
020        super(new ContainerHopper(par1InventoryPlayer, par2IInventory));
021        this.field_94081_r = par1InventoryPlayer;
022        this.field_94080_s = par2IInventory;
023        this.allowUserInput = false;
024        this.ySize = 133;
025    }
026
027    /**
028     * Draw the foreground layer for the GuiContainer (everything in front of the items)
029     */
030    protected void drawGuiContainerForegroundLayer(int par1, int par2)
031    {
032        this.fontRenderer.drawString(this.field_94080_s.func_94042_c() ? this.field_94080_s.getInvName() : StatCollector.translateToLocal(this.field_94080_s.getInvName()), 8, 6, 4210752);
033        this.fontRenderer.drawString(this.field_94081_r.func_94042_c() ? this.field_94081_r.getInvName() : StatCollector.translateToLocal(this.field_94081_r.getInvName()), 8, this.ySize - 96 + 2, 4210752);
034    }
035
036    /**
037     * Draw the background layer for the GuiContainer (everything behind the items)
038     */
039    protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
040    {
041        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
042        this.mc.renderEngine.func_98187_b("/gui/hopper.png");
043        int k = (this.width - this.xSize) / 2;
044        int l = (this.height - this.ySize) / 2;
045        this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
046    }
047}