    001package net.minecraft.client.gui.inventory;
    002
    003import cpw.mods.fml.relauncher.Side;
    004import cpw.mods.fml.relauncher.SideOnly;
    005import net.minecraft.entity.player.InventoryPlayer;
    006import net.minecraft.inventory.ContainerDispenser;
    007import net.minecraft.tileentity.TileEntityDispenser;
    008import net.minecraft.util.StatCollector;
    009import org.lwjgl.opengl.GL11;
    010
    011@SideOnly(Side.CLIENT)
    012public class GuiDispenser extends GuiContainer
    013{
    014    public GuiDispenser(InventoryPlayer par1InventoryPlayer, TileEntityDispenser par2TileEntityDispenser)
    015    {
    016        super(new ContainerDispenser(par1InventoryPlayer, par2TileEntityDispenser));
    017    }
    018
    019    /**
    020     * Draw the foreground layer for the GuiContainer (everything in front of the items)
    021     */
    022    protected void drawGuiContainerForegroundLayer(int par1, int par2)
    023    {
    024        this.fontRenderer.drawString(StatCollector.translateToLocal("container.dispenser"), 60, 6, 4210752);
    025        this.fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
    026    }
    027
    028    /**
    029     * Draw the background layer for the GuiContainer (everything behind the items)
    030     */
    031    protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
    032    {
    033        int var4 = this.mc.renderEngine.getTexture("/gui/trap.png");
    034        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    035        this.mc.renderEngine.bindTexture(var4);
    036        int var5 = (this.width - this.xSize) / 2;
    037        int var6 = (this.height - this.ySize) / 2;
    038        this.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);
    039    }
    040}