Advertisement
Guest User

GuiFurnace

a guest
Jan 31st, 2014
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.18 KB | None | 0 0
  1. package net.scratchforfun.mod.gui;
  2.  
  3. import org.lwjgl.opengl.GL11;
  4. import cpw.mods.fml.relauncher.Side;
  5. import cpw.mods.fml.relauncher.SideOnly;
  6. import net.minecraft.client.Minecraft;
  7. import net.minecraft.client.gui.inventory.GuiContainer;
  8. import net.minecraft.client.resources.I18n;
  9. import net.minecraft.entity.player.InventoryPlayer;
  10. import net.minecraft.inventory.Container;
  11. import net.minecraft.util.ResourceLocation;
  12. import net.scratchforfun.mod.ScratchForFun;
  13. import net.scratchforfun.mod.tileentity.TileEntityQuartzFurnace;
  14.  
  15. @SideOnly(Side.CLIENT)
  16. public class GuiQuartzFurnace extends GuiContainer{
  17.    
  18.     public static final ResourceLocation FURNACEGUI = new ResourceLocation(ScratchForFun.modid, "textures/gui/quartzFurnace.png");
  19.    
  20.     public TileEntityQuartzFurnace quartzFurnace;
  21.  
  22.     public GuiQuartzFurnace(InventoryPlayer inventoryPlayer, TileEntityQuartzFurnace entity) {
  23.        
  24.         super(new ContainerQuartzFurnace(inventoryPlayer, entity));
  25.        
  26.         this.quartzFurnace = entity;
  27.  
  28.         this.xSize = 176;
  29.         this.ySize = 166;
  30.     }
  31.  
  32.     public void drawGuiContainerForegroundLayer(int par1, int par2){
  33.         String name = this.quartzFurnace.isInvNameLocalized() ? this.quartzFurnace.getInvName() : "Quartz Furnace";
  34.        
  35.         this.fontRenderer.drawString(name, this.xSize /2 - this.fontRenderer.getStringWidth(name) / 2, 6, 4210752);
  36.         this.fontRenderer.drawString("Inventory", 8, this.ySize - 96 + 2, 4210752);
  37.     }
  38.     /** Draws eveything behind the items*/
  39.     protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3){
  40.         GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  41.         this.mc.getTextureManager().bindTexture(FURNACEGUI);
  42.         int k = (this.width - this.xSize) / 2;
  43.         int l = (this.height - this.ySize) / 2;
  44.         this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
  45.         int i1;
  46.  
  47.         /*if (this.quartzFurnace.isBurning())
  48.         {
  49.             i1 = this.quartzFurnace.getBurnTimeRemainingScaled(12);
  50.             this.drawTexturedModalRect(k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 2);
  51.         }
  52.  
  53.         i1 = this.quartzFurnace.getCookProgressScaled(24);
  54.         this.drawTexturedModalRect(k + 79, l + 34, 176, 14, i1 + 1, 16);*/
  55.     }
  56.  
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement