Jump to content

GUI texture issues on compile


Recommended Posts

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 :P


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;

        protected void drawGuiContainerForegroundLayer(int param1, int param2) {
                fontRenderer.drawString("Road Painter", 8, -12, 4210752);
                fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, ySize - 113, 4210752);

        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);

width=463 height=200


My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

Link to comment
Share on other sites

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.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.