Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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

  • 6 months later...
  • Author

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

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.

 

I believe the default location is the workspace directory, where build.gradle is located. Assets of course follow the format mentioned above, but resources that are not prefixed with "modid:" / (modid, ...) need to be specified in relation to the base working directory.

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.