Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package phnxflms.unidye;
- import org.lwjgl.opengl.GL11;
- import net.minecraft.client.gui.inventory.GuiContainer;
- import net.minecraft.entity.player.InventoryPlayer;
- import net.minecraft.util.ResourceLocation;
- import net.minecraft.util.StatCollector;
- public class GuiWoolDyer extends GuiContainer{
- private static final ResourceLocation gui = new ResourceLocation("unidye", "textures/gui/GUIWoolDyer.png");
- protected TileEntityWoolDyer tileentity;
- public GuiWoolDyer (InventoryPlayer inventoryPlayer,
- TileEntityWoolDyer tileEntity) {
- //the container is instantiated and passed to the superclass for handling
- super(new ContainerWoolDyer(inventoryPlayer, tileEntity));
- tileentity=tileEntity;
- }
- @Override
- protected void drawGuiContainerForegroundLayer(int param1, int param2) {
- //draw text and stuff here
- //the parameters for drawString are: string, x, y, color
- fontRenderer.drawString("Wool Dyeing Plant", 8, 6, 4210752);
- fontRenderer.drawString("Wool: " + tileentity.woolCount, 55, 55, 4210752);
- //draws "Inventory" or your regional equivalent
- fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, ySize - 96 + 2, 4210752);
- }
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2,
- int par3) {
- //draw your Gui here, only thing you need to change is the path
- this.mc.renderEngine.bindTexture(gui);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement