-
-
Save anonymous/f408bccab0efc8fd77eacd0e833b7f90 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 com.chocolatemod.specialblocks.container; | |
import com.chocolatemod.specialblocks.tileentity.TileEntityPress; | |
import net.minecraft.client.gui.inventory.GuiContainer; | |
import net.minecraft.client.renderer.GlStateManager; | |
import net.minecraft.inventory.IInventory; | |
import net.minecraft.util.ResourceLocation; | |
public class GuiTileEntityPress extends GuiContainer{ | |
private IInventory playerInv; | |
private TileEntityPress te; | |
public GuiTileEntityPress(IInventory playerInv, TileEntityPress te) { | |
super(new ContainerTileEntityPress(playerInv, te)); | |
this.playerInv = playerInv; | |
this.te = te; | |
this.xSize = 176; | |
this.ySize = 166; | |
} | |
@Override | |
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { | |
GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f); | |
this.mc.getTextureManager().bindTexture(new ResourceLocation("kjd:textures/gui/container/press.png")); | |
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize); | |
} | |
@Override | |
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { | |
String s = this.te.getDisplayName().getUnformattedText(); | |
this.fontRendererObj.drawString(s, 88 - this.fontRendererObj.getStringWidth(s) / 2, 6, 4210752); //#404040 | |
this.fontRendererObj.drawString(this.playerInv.getDisplayName().getUnformattedText(), 8, 72, 4210752); //#404040 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment