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

I have a coremod that needs to load some image assets and draw them on the screen in a GUI. I'm using the OpenGL drawing functions, so I need to get a ResourceLocation for the images before I can bind the textures and draw them.

 

However, upon trying to bind the texture, an error occurs:

 

 

2013-07-13 15:40:42 [WARNING] [Minecraft-Client] Failed to load texture: mymodid:textures/gui/image.png

java.io.FileNotFoundException: mymodid:textures/gui/image.png

at net.minecraft.client.resources.SimpleReloadableResourceManager.func_110536_a(SimpleReloadableResourceManager.java:66)

at net.minecraft.client.renderer.texture.SimpleTexture.func_110551_a(SimpleTexture.java:31)

at net.minecraft.client.renderer.texture.TextureManager.func_110579_a(TextureManager.java:84)

at net.minecraft.client.renderer.texture.TextureManager.func_110577_a(TextureManager.java:41)

at com.voidzm.mymodid.gui.MyGui.drawScreenBackground(MyGui.java:106)

at com.voidzm.mymodid.gui.MyGui.drawScreen(MyGui.java:123)

at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1036)

at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:934)

at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:826)

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:57)

at net.minecraft.launchwrapper.Launch.main(Launch.java:18)

 

 

I'm using this code to create the ResourceLocation:

 

 

ResourceLocation resourceLocation = new ResourceLocation("mymodid:textures/gui/image.png");

 

 

And this code to bind it for drawing:

 

 

this.mc.renderEngine.func_110577_a(resourceLocation);

 

 

"image.png" is located at "/assets/mymodid/textures/gui/image.png". I did read that having an uppercase modid in the file path would cause this error to occur, but the modid is lowercase, so that can't be the problem.

 

Any ideas? I can't seem to make this ResourceLocation stuff work properly, and I don't know if the fact that I don't have a regular @Mod file has anything to do with it. If it does, then this is a really stupid way to have the texture system set up (requiring a @Mod file with a registered modid before the resource engine will find any of your 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.

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.