Java tutorial
package com.frozencode.microconnections.client.interfaces; import com.frozencode.microconnections.tileentity.TileEntityMCIBench; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; /** * Created by FrozenCode on 22/06/2014. * This is an opensource mod, so please do take snippets if required but read the GPL v3 license before using my code */ @SideOnly(Side.CLIENT) public class GUIMCIBench extends GuiContainer { public GUIMCIBench(EntityPlayer player, TileEntityMCIBench bench) { super(new ContainerMCIBench(player, bench)); xSize = 176; ySize = 199; } private static final ResourceLocation textures = new ResourceLocation("microconnections", "textures/gui/mcibench.png"); @Override protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { GL11.glColor4f(1, 1, 1, 1); Minecraft.getMinecraft().getTextureManager().bindTexture(textures); drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); } }