Jump to content

Textures not loading in 1.6.1


Cyclonit

Recommended Posts

Hi,

 

the textures of my TileEntities are not loading properly. This is the full error:

 

2013-07-03 13:22:44 [WARNING] [Minecraft-Client] Failed to load texture: advancedChests:textures/models/ironChest.png
java.io.FileNotFoundException: advancedChests:textures/models/ironChest.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:32)
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 cyclonit.advancedChests.client.ItemAdvancedChestRenderer.render(ItemAdvancedChestRenderer.java:62)
at cyclonit.advancedChests.client.ItemAdvancedChestRenderer.renderItem(ItemAdvancedChestRenderer.java:52)
at net.minecraftforge.client.ForgeHooksClient.renderInventoryItem(ForgeHooksClient.java:146)
at net.minecraft.client.renderer.entity.RenderItem.func_110797_b(RenderItem.java:423)
at net.minecraft.client.gui.GuiIngame.renderInventorySlot(GuiIngame.java:976)
at net.minecraftforge.client.GuiIngameForge.renderHotbar(GuiIngameForge.java:206)
at net.minecraftforge.client.GuiIngameForge.renderGameOverlay(GuiIngameForge.java:141)
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1014)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:930)
at net.minecraft.client.Minecraft.run(Minecraft.java:822)
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)

 

This is how I am setting up the ResourceLocations:

 

this.modelTexture = new ResourceLocation(Constants.MODID, "textures/models/" + realName + ".png");

 

Constants.MODID = "advancedChests"

realName = "ironChest"

 

The texture I'd like to load is located in "mcp\src\minecraft\assets\advancedChests\textures\models\ironChest.png"

 

What am I doing wrong?

Link to comment
Share on other sites

Make sure that the file structure for your textures is:

src\minecraft\assets\<modname>\textures\blocks/items/etc.

there also should be a pack.mcmeta file in the textures folder for ResourceLocation(domain, filename), though I don't know why, I use the "domain:filename" form instead and things work alright.

 

Also, while Forge /should/ recheck LanguageRegistry stuff after PreInit, it doesn't seem to be doing that in 761, so you need to move all the LanguageRegistry calls in your main mod file to PreInit for the texture loading functions to actually be called. 

 

That fixed all the problems with block and item textures for me, you can see my code at https://github.com/Malorolam/Carbonization

Guis aren't behaving yet for me though.

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.