-
-
Save NikolaTheProgrammingNoob/415be4fd331c26f391d0 to your computer and use it in GitHub Desktop.
The Block GUI Class
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.nikola.carbonmod.gui; | |
import com.nikola.carbonmod.Reference; | |
import com.nikola.carbonmod.container.ContainerIronForge; | |
import net.minecraft.client.gui.inventory.GuiContainer; | |
import net.minecraft.client.renderer.GlStateManager; | |
import net.minecraft.client.resources.I18n; | |
import net.minecraft.entity.player.InventoryPlayer; | |
import net.minecraft.inventory.Container; | |
import net.minecraft.inventory.ContainerWorkbench; | |
import net.minecraft.util.BlockPos; | |
import net.minecraft.util.ResourceLocation; | |
import net.minecraft.world.World; | |
import net.minecraftforge.fml.relauncher.Side; | |
import net.minecraftforge.fml.relauncher.SideOnly; | |
public class GuiIronForge extends GuiContainer | |
{ | |
private static final ResourceLocation ironForgeGuiTextures = new ResourceLocation(Reference.MOD_ID + ":" + "textures/gui/container/ironForge.png"); | |
private static final String __OBFID = "CL_00000750"; | |
public GuiIronForge(InventoryPlayer playerInv, World worldIn) | |
{ | |
this(playerInv, worldIn, BlockPos.ORIGIN); | |
} | |
public GuiIronForge(InventoryPlayer playerInv, World worldIn, BlockPos blockPosition) { | |
super(new ContainerIronForge(playerInv, worldIn, blockPosition)); | |
} | |
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) | |
{ | |
this.fontRendererObj.drawString(I18n.format("Iron Forge", new Object[0]), 28, 6, 4210752); | |
this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); | |
} | |
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) | |
{ | |
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); | |
this.mc.getTextureManager().bindTexture(ironForgeGuiTextures); | |
int k = (this.width - this.xSize) / 2; | |
int l = (this.height - this.ySize) / 2; | |
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment