Posted July 31, 201312 yr Hey guys, I've got a GUI in my mod. When I test in eclipse, all is well - but when I compile, the GUI texture wont load, I just get a purple/black background with all my slots on. I've checked, the path is correct and capitalization all matches. I'm getting this issue in three different mods, only affecting GUIs and only once compiled. So, there must be something wrong with my actual code Here's the code. Any ideas? package co.uk.silvania.roads.tileentities; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.util.ResourceLocation; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import org.lwjgl.opengl.GL11; import co.uk.silvania.roads.tileentities.entities.TileEntityRoadPainterEntity; public class GuiRoadPainter extends GuiContainer { public GuiRoadPainter (InventoryPlayer inventoryPlayer, World world, int x, int y, int z) { super(new ContainerRoadPainter(inventoryPlayer, world, x, y, z)); } protected int xSize = 176; protected int ySize = 204; @Override protected void drawGuiContainerForegroundLayer(int param1, int param2) { fontRenderer.drawString("Road Painter", 8, -12, 4210752); fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, ySize - 113, 4210752); } @Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); Minecraft.getMinecraft().renderEngine.func_110577_a(new ResourceLocation("roads", "/textures/gui/roadpaintergui.png")); int x = (width - xSize) / 2; int y = (height - ySize) / 2; this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize); } } http://s13.postimg.org/z9mlly2av/siglogo.png[/img] My mods (Links coming soon) Cities | Roads | Remula | SilvaniaMod | MoreStats
July 31, 201312 yr new ResourceLocation("roads", "/textures/gui/roadpaintergui.png") Remove slash before "textures"
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.