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