Hello kind Forge People,
a few days ago I decided i wanted to learn to create my own mods in Minecraft using Forge. Sadly, despite several helpful tutorials, I'm facing some problems rather early on. More precisely, I wanted to start with creating a simple Item with a given texture (as several tutorials do it). Somehow none of them seem to work in my case. My "test" Item is still without texture/model. And because different tutorials sometimes use different methods to i.e. register an Item-model, I'm don't know where the problem lies.
I'm not sure if this is the right place to ask, but after 2 days of internet searches and many failed trial&errors I dont know what else to do.
My First question would be:
I have seen two different methods to register item-textures in a mod:
1. calling ModelLoader.setCustomModelResourceLocation( <Item> , 0, new ModelResourceLocation( <ItemRegistryName ?or? LocationOfTheSavedModelJson?>, "inventory"))
2. calling Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register( <Item>, 0, new ModelResourceLocation( ... , "inventory"))
What is the difference between those two? And which one should I use?
What exactlt do I have to give ModelResourceLocation(...) as arguments? The path of the model.json or the RegstryName of the Item? Or has there to be a connection between those two?
Is there some kind of Documentation where these things are explained?
My second Question (a little more direct):
I made a very tiny 'mod' in order to test a texture for an item. Maybe you could take a look at it and tell me why it doesn't work? I attached all relevant files including a picture of my folder structure to show that this is (hopefully) correct.
The Image of the copperIngot comes from "shadofacts"-tutorial at https://shadowfacts.net/tutorials/forge-modding-1102/json-item-models/
The Testitem appears to be registered correctly as it appears ingame in the Tools-Tab. Somehow the line that registeres the texture doesn't really seem to work.
All Tutorials I've seen stress the separation into Serverside & Clientside stuff. To keep this example as simple as possible I cut that out. It should still function without, right? Or is there some hidden secret that says that all rendering stuff only works if you drop keywords like "ClientProxy" oder "ClientSide" at the right places?
Finally I want to say that I'm also new to Java, which might be a little bit problematic for you guys, but I find that reading a few things about Java is far easier than finding anything about forge. Is there somewhere a larger documentation than the one at https://mcforge.readthedocs.io/en/latest/ ?
TestMod.class
ItemTest.class
itemtest.json