Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.smith.mod.gui;
- import org.lwjgl.opengl.GL11;
- import net.minecraft.client.Minecraft;
- import net.minecraft.client.gui.inventory.GuiContainer;
- import net.minecraft.client.resources.I18n;
- import net.minecraft.entity.player.InventoryPlayer;
- import net.minecraft.inventory.Container;
- import net.minecraft.util.ResourceLocation;
- import com.smith.mod.container.ContainerSuperHotFurnace;
- import com.smith.mod.Smithing;
- import com.smith.mod.tileentity.TileEntitySuperHotFurnace;
- public class GuiSuperHotFurnace extends GuiContainer {
- public static final ResourceLocation bground = new ResourceLocation(Smithing.modid + ":" + "textures/gui/GuiSuperHotFurnace.png");
- public TileEntitySuperHotFurnace superHotFurnace;
- public GuiSuperHotFurnace(InventoryPlayer inventoryPlayer, TileEntitySuperHotFurnace entity) {
- super(new ContainerSuperHotFurnace(inventoryPlayer, entity));
- this.superHotFurnace = entity;
- this.xSize = 176;
- this.ySize = 166;
- }
- public void drawGuiContainerForegroundLayer(int par1, int par2) {
- String name = "Super Hot Furnace";
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8 , this.ySize - 96 + 2 , 4210752);
- }
- @Override
- protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3) {
- GL11.glColor4f(1F, 1F, 1F, 1F);
- Minecraft.getMinecraft().getTextureManager().bindTexture(bground);
- drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
- if(this.superHotFurnace.isBurning()) {
- int k = this.superHotFurnace.getBurnTimeRemainingScaled(11);
- int j = 11 - k;
- drawTexturedModalRect(guiTop + 30, guiLeft + 23, 176, 0, 16 - j, 11);
- }
- int k = this.superHotFurnace.getCookProgressScaled(44);
- drawTexturedModalRect(guiLeft + 47, guiTop + 19, 176, 16, k + 1, 16);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment