Created
May 20, 2015 16:04
-
-
Save anonymous/031376f15ede127146d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package fr.ah26.futura.common; | |
import org.lwjgl.opengl.GL11; | |
import net.minecraft.client.gui.inventory.GuiContainer; | |
import net.minecraft.client.resources.I18n; | |
import net.minecraft.entity.player.InventoryPlayer; | |
import net.minecraft.inventory.IInventory; | |
import net.minecraft.util.ResourceLocation; | |
public class GuiXFurnace extends GuiContainer | |
{ | |
private static final ResourceLocation texture = new ResourceLocation(Futura.MODID,"textures/gui/container/guiXFurnace.png"); | |
private TileEntityXFurnace tileXFurnace; | |
private IInventory playerInv; | |
public GuiXFurnace(TileEntityXFurnace tile, InventoryPlayer inventory) | |
{ | |
super(new ContainerXFurnace(tile, inventory)); | |
this.tileXFurnace = tile; | |
this.playerInv = inventory; | |
this.allowUserInput = false; | |
this.ySize = 256; | |
this.xSize = 256; | |
} | |
@Override | |
protected void drawGuiContainerBackgroundLayer(float partialRenderTick, int x, int y) | |
{ | |
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); | |
this.mc.getTextureManager().bindTexture(texture); | |
int k = (this.width - this.xSize) / 2; | |
int l = (this.height - this.ySize) / 2; | |
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); | |
this.drawTexturedModalRect(0, 0, 176, 14, 100 + 1, 16); | |
} | |
protected void drawGuiContainerForegroundLayer(int x, int y) | |
{ | |
this.fontRendererObj.drawString(this.playerInv.hasCustomInventoryName() ? this.playerInv.getInventoryName() : I18n.format(this.playerInv.getInventoryName()), 10, this.ySize - 98, 4210752); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment