I'm new to Forge's API in modding, and I've been following different examples to try and create a mod for 1.7.10. I am attempting to make a simple item, however, the texture simply does not show up, even though I followed the common steps everyone takes.
When you register your item, you're calling substring(5) on the unlocalized name, people usually put the modid before the name so in this case, the unlocalized name doesn't match your texture name. If you remove the method call, it should work.
Hello.
I'm new to Forge's API in modding, and I've been following different examples to try and create a mod for 1.7.10. I am attempting to make a simple item, however, the texture simply does not show up, even though I followed the common steps everyone takes.
Here are my code file contents:
Main class that I use
Item file
My item texture is located in src/main/resources/assets/simplorcraft/textures/items/christmasdust.png.
I'm not new to Java, only the API. I'm confused regarding what slip up I have made. Any suggestions or help is very much appreciated.
(If you need extra information just let me know.)
A quick fix on your part, on this line:
GameRegistry.registerItem(dustChristmas, dustChristmas.getUnlocalizedName().substring(5));
When you register your item, you're calling substring(5) on the unlocalized name, people usually put the modid before the name so in this case, the unlocalized name doesn't match your texture name. If you remove the method call, it should work.