    001    package net.minecraft.src;
    002
    003    import cpw.mods.fml.common.Side;
    004    import cpw.mods.fml.common.asm.SideOnly;
    005    import org.lwjgl.opengl.GL11;
    006
    007    @SideOnly(Side.CLIENT)
    008    public class GuiFurnace extends GuiContainer
    009    {
    010        private TileEntityFurnace furnaceInventory;
    011
    012        public GuiFurnace(InventoryPlayer par1InventoryPlayer, TileEntityFurnace par2TileEntityFurnace)
    013        {
    014            super(new ContainerFurnace(par1InventoryPlayer, par2TileEntityFurnace));
    015            this.furnaceInventory = par2TileEntityFurnace;
    016        }
    017
    018        /**
    019         * Draw the foreground layer for the GuiContainer (everything in front of the items)
    020         */
    021        protected void drawGuiContainerForegroundLayer(int par1, int par2)
    022        {
    023            this.fontRenderer.drawString(StatCollector.translateToLocal("container.furnace"), 60, 6, 4210752);
    024            this.fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
    025        }
    026
    027        /**
    028         * Draw the background layer for the GuiContainer (everything behind the items)
    029         */
    030        protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
    031        {
    032            int var4 = this.mc.renderEngine.getTexture("/gui/furnace.png");
    033            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    034            this.mc.renderEngine.bindTexture(var4);
    035            int var5 = (this.width - this.xSize) / 2;
    036            int var6 = (this.height - this.ySize) / 2;
    037            this.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);
    038            int var7;
    039
    040            if (this.furnaceInventory.isBurning())
    041            {
    042                var7 = this.furnaceInventory.getBurnTimeRemainingScaled(12);
    043                this.drawTexturedModalRect(var5 + 56, var6 + 36 + 12 - var7, 176, 12 - var7, 14, var7 + 2);
    044            }
    045
    046            var7 = this.furnaceInventory.getCookProgressScaled(24);
    047            this.drawTexturedModalRect(var5 + 79, var6 + 34, 176, 14, var7 + 1, 16);
    048        }
    049    }