Jump to content

Solved: Using missing texture, unable to load:


TheGreyGhost

Recommended Posts

After three hours wrestling with this damn error:

[sEVERE] [Minecraft-Client] Using missing texture, unable to load: testitemrendering:textures/items/Error.png

I finally figured out where to place my icons and textures so that Minecraft will find them.

 

In order to find the icon corresponding to

itemIcon = iconRegister.registerIcon("TestItemRendering:Error");

it is constructed as :

{base path}/assets/{mod name}/textures/items/{Icon name}.png

 

In my case, this comes out as

C:\Documents and Settings\TheGreyGhost\My Documents\IDEAprojects\ForgeCurrent\out\production\TestItemRendering\assets\testitemrendering\textures\items/error.png

 

where my base path was

C:\Documents and Settings\TheGreyGhost\My Documents\IDEAprojects\ForgeCurrent\out\production\TestItemRendering

 

The hardest bit was figuring out what the base path should be, it will be different for you of course.

 

I finally found it by inserting a breakpoint in here.

 

    public AbstractResourcePack(File par1File)
    {
        this.basePath = par1File;
    }

 

If that doesn't work for you, you might also try

 

FolderResourcePack 
    protected boolean makeFullPath(String par1Str)
    {
        return (new File(this.basePath, par1Str)).isFile();
    }

FileResourcePack
    protected boolean makeFullPath(String par1Str)
    {
        return (new File(this.basePath, par1Str)).isFile();
    }

Link to comment
Share on other sites

  • 6 months later...

It looks like the handling of Resources has been changed yet again.

 

FolderResourcePack::

    protected InputStream getInputStreamByName(String par1Str) throws IOException
    {
        return new BufferedInputStream(new FileInputStream(new File(this.resourcePackFile, par1Str)));   // breakpoint here
    }

--> look in this.resourcePackFile

(may need to continue several times until you find the right one).

 

or alternatively

    protected InputStream getInputStreamByName(String par1Str) throws IOException
    {
        System.out.println("this.resourcePackFile:" + this.resourcePackFile.toString());           // todo: debugging only, remove
        return new BufferedInputStream(new FileInputStream(new File(this.resourcePackFile, par1Str)));
    }

 

-TGG

Link to comment
Share on other sites

For my normal eclipse setup and gradle configured arrangement, I found that it looks for such things here:

<PROJECT_LOC>\src\main\resources\assets\<modid>\textures\blocks\<blocktexture>.png

 

<PROJECT_LOC>\src\main\resources\assets\<modid>\textures\items\<itemtexture>.png

 

As for other things, I haven't used them yet. So, I dunno.

 

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.

×
×
  • Create New...

Important Information

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