Jump to content

hugin

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by hugin

  1. Thank you so much! The problem seems to appear because I called " new ItemTest() " twice and created two different testitems on the heap (one for register and the other for the Modelregistration). I will need to take a closer look at the setCustomModelResourceLocation method to find out where exactly this causes a problem, but I can do so on my own now. When creating a single testitem via "ItemTest()" and use it as argument for register(...) AND setCustomModelResourceLocation(...) it works! Thanks again for the quick help! Really nice. The topic can be closed now I guess.
  2. Thanks! I fixed the braces in my json file. One error less. Sadly though, the texture of my model still wont be displayed And now there isn't even an "ERROR" message in the fml.log (see http://pastebin.com/kqHqBPbc). Any more suggestions what I might be missing? And as additional (slight off-topic) question: In this tutorial: http://couchdoescode.blogspot.de/2017/02/items.html?view=flipcard , Alex (the author) mentions unmodded minecraft model files (in a folder at "Referenced Libraries > forgesrc.jar > assets > minecraft > models > item" (particularly the diamond.json ) ), but I can't find this folder like i.e. the forgsrc.jar. Is it supposed to be in the unpacked forge folder? Or somewhere else?
  3. The fml-client-latest.log that I get with the code as posted before is this: http://pastebin.com/4SQYGzMd At [16:30:46] you'll find an Error message that says forge couldn't load the model due to (Line 431) the missing json file: test1:models/item/testitem_regname.json Now I wasn't aware that the name of the json needed to coincide with the RegistryName of my Item but apparently this caused a problem. When creating an additional json file (called "testitem_regname.json") at the required location (with the same content as the previously posted "itemtest.json"), I still don't have my texture in-game The new fml-client-latest.log that I now get is: http://pastebin.com/ekTkNtan At [16:50:43] you'll again find an error message (caused by something at line 479 ?) Can you explain what these error-messages mean? / Why my example doesn't work?
  4. Upps, sorry. Here in plain text: TestMod.java : http://pastebin.com/3maRjEj7 ItemTest.java : http://pastebin.com/bRCtNNZi itemtest.json : http://pastebin.com/rmvC4MMc
  5. 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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.