planetguy Posted March 24, 2013 Share 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. Link to comment Share on other sites More sharing options...
Lethosos Posted March 24, 2013 Share 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. Link to comment Share on other sites More sharing options...
planetguy Posted March 24, 2013 Author Share 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? Link to comment Share on other sites More sharing options...
Lethosos Posted March 24, 2013 Share 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. Link to comment Share on other sites More sharing options...
Markarthian Posted March 24, 2013 Share 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... Link to comment Share on other sites More sharing options...
planetguy Posted March 26, 2013 Author Share 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. Link to comment Share on other sites More sharing options...
Markarthian Posted March 26, 2013 Share 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 ) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now