planetguy Posted March 24, 2013 Posted March 24, 2013 Registering an icon, you need to pass in a string, which I assume is the path to the texture. How do you format the path? I divide my mod into packages of similar functions, so that my textures are at mod folder/planetguy/Gizmos/spy for example. Quote
Lethosos Posted March 24, 2013 Posted March 24, 2013 Someone posted a short tutorial on that on the Forge forums. I don't have the direct link on hand, though. Quote
planetguy Posted March 24, 2013 Author Posted March 24, 2013 Thanks for telling me, I found it here. Another thing, I have a persistent error: 2013-03-24 09:29:11 [iNFO] [sTDERR] java.lang.RuntimeException: Don't register null! 2013-03-24 09:29:11 [iNFO] [sTDERR] at net.minecraft.client.renderer.texture.TextureMap.registerIcon(TextureMap.java:229) 2013-03-24 09:29:11 [iNFO] [sTDERR] at net.minecraft.item.Item.updateIcons(Item.java:726) 2013-03-24 09:29:11 [iNFO] [sTDERR] at net.minecraft.client.renderer.texture.TextureMap.refreshTextures(TextureMap.java:85) 2013-03-24 09:29:11 [iNFO] [sTDERR] at net.minecraft.client.renderer.RenderEngine.refreshTextureMaps(RenderEngine.java:521) 2013-03-24 09:29:11 [iNFO] [sTDERR] at net.minecraft.client.renderer.RenderEngine.refreshTextures(RenderEngine.java:432) 2013-03-24 09:29:11 [iNFO] [sTDERR] at cpw.mods.fml.client.FMLClientHandler.onInitializationComplete(FMLClientHandler.java:247) 2013-03-24 09:29:11 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.startGame(Minecraft.java:475) 2013-03-24 09:29:11 [iNFO] [sTDERR] at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44) 2013-03-24 09:29:11 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:729) 2013-03-24 09:29:11 [iNFO] [sTDERR] at java.lang.Thread.run(Thread.java:722) 2013-03-24 09:29:11 [iNFO] [sTDERR] java.lang.NullPointerException 2013-03-24 09:29:11 [iNFO] [sTDERR] at net.minecraft.client.renderer.texture.TextureMap.refreshTextures(TextureMap.java:102) 2013-03-24 09:29:11 [iNFO] [sTDERR] at net.minecraft.client.renderer.RenderEngine.refreshTextureMaps(RenderEngine.java:521) 2013-03-24 09:29:11 [iNFO] [sTDERR] at net.minecraft.client.renderer.RenderEngine.refreshTextures(RenderEngine.java:432) 2013-03-24 09:29:11 [iNFO] [sTDERR] at cpw.mods.fml.client.FMLClientHandler.onInitializationComplete(FMLClientHandler.java:247) 2013-03-24 09:29:11 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.startGame(Minecraft.java:475) 2013-03-24 09:29:11 [iNFO] [sTDERR] at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44) 2013-03-24 09:29:11 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:729) 2013-03-24 09:29:11 [iNFO] [sTDERR] at java.lang.Thread.run(Thread.java:722) Edit: I narrowed it down to the spy table part, which is probably not working because it contains a GUI screen. Anyone know what needs to be done to GUIs to fix texture loading in 1.5? Quote
Lethosos Posted March 24, 2013 Posted March 24, 2013 Should be no depreciatable change to how GUI art is coded in, AFAIK. The way they arranged the texture directory after I used Unsticher on a pre 1.5 texture pack says that they go into a GUI folder. Quote
Markarthian Posted March 24, 2013 Posted March 24, 2013 That's weird... You're registering a possible runtime exception (with the code I gave you) but it is null?? The code should work. If it hasn't got anything to do with that config stuff, idk... Quote
planetguy Posted March 26, 2013 Author Posted March 26, 2013 I found it! I never gave the spy lens item (an ingredient for the spy lab) an unlocalized name, so it was null. Quote
Markarthian Posted March 26, 2013 Posted March 26, 2013 I found it! I never gave the spy lens item (an ingredient for the spy lab) an unlocalized name, so it was null. Ahh, yeah... That is indeed problematic. (well, not anymore ) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.