Jump to content

Problem with GUI texture


Jeerdus

Recommended Posts

Good day,

I cannot figure out why I always get this error:

[WARNING] [Minecraft-Client] Failed to load texture: Cyborg53373_Elementum:/textures/gui/cellingMachineGUI.png
java.io.FileNotFoundException: Cyborg53373_Elementum:/textures/gui/cellingMachineGUI.png
at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67)
at net.minecraft.client.renderer.texture.SimpleTexture.loadTexture(SimpleTexture.java:31)
at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:84)
at net.minecraft.client.renderer.texture.TextureManager.bindTexture(TextureManager.java:41)
at elementum.GuiCellingMachine.drawGuiContainerBackgroundLayer(GuiCellingMachine.java:36)
at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:111)
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1036)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:946)
at net.minecraft.client.Minecraft.run(Minecraft.java:838)
at net.minecraft.client.main.Main.main(Main.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)
at net.minecraft.launchwrapper.Launch.main(Launch.java:27)

when I open my custom furnace. (but Minecraft doesn't crash)

Basicly it doesn't load the texture (there are only the purple-black squares)

Here's my GuiCellingMachine:

package elementum;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import org.lwjgl.opengl.GL11;
import elementum.Elementum;
import elementum.ContainerCellingMachine;
import elementum.ElementumGuiHandler;
import elementum.TileEntityCellingMachine;
import elementum.SlotInputCellingMachine;

public class GuiCellingMachine extends GuiContainer
{
private ResourceLocation tif = new ResourceLocation("Cyborg53373_Elementum","/textures/gui/cellingMachineGUI.png");
private TileEntityCellingMachine inputMachineInventory;

public GuiCellingMachine(InventoryPlayer inventoryplayer, TileEntityCellingMachine tileentityCellingMachine)
{
         super(new ContainerCellingMachine(inventoryplayer, tileentityCellingMachine));
         inputMachineInventory = tileentityCellingMachine;
}

protected void drawGuiContainerForegroundLayer(int par1, int par2)
{
         fontRenderer.drawString(StatCollector.translateToLocal("Celling Machine"), 40, 6, 0x404040);
         fontRenderer.drawString(StatCollector.translateToLocal("Inventory"), 8, (ySize - 96) + 2, 0x404040);
}

protected void drawGuiContainerBackgroundLayer(float f, int i, int j)
{
         GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
         //mc.renderEngine.bindTexture(tif);
         Minecraft.getMinecraft().getTextureManager().bindTexture(tif);
         int l = (width - xSize) / 2;
         int i1 = (height - ySize) / 2;
         drawTexturedModalRect(l, i1, 0, 0, xSize, ySize);
         if (inputMachineInventory.isBurning())
         {
                 int j1 = inputMachineInventory.getBurnTimeRemainingScaled(12);
                 drawTexturedModalRect(l + 56, (i1 + 36 + 12) - j1, 176, 12 - j1, 14, j1 + 2);
         }
         int k1 = inputMachineInventory.getCookProgressScaled(24);
         drawTexturedModalRect(l + 79, i1 + 34, 176, 14, k1 + 1, 16);
}
}

Link to comment
Share on other sites

"/textures

Make that

"textures

 

A / is automatically inserted for you between your mod ID and your texture path:

 

Cyborg53373_Elementum:/textures/gui/cellingMachineGUI.png

 

That : is converted to a / when it attempts to load files.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Aah! Just found out I had to type my modID lowercased.

Stupid me... :D

 

Yup, that too.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.

Guest
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.

Announcements



×
×
  • Create New...

Important Information

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