Posted November 1, 20177 yr I have a problem with my mod. I don´t know how to create custom models from wavefront obj files. I watched some tutorials but it still isn´t working for me. I hqave the OBJLoader and I have the blockstate file (https://pastebin.com/eCLFEfmw), the mtl file (https://pastebin.com/f8QC47WD) and the obj file (https://pastebin.com/PaQ4AEdh ) but it won´t work. Every time I start the test client it gives me this error: https://pastebin.com/NtB3zgUT . Please give me a simple answer because I´m not good at creating custom models. I know things about java but there is still much for me to learn.
November 1, 20177 yr Caused by: java.io.FileNotFoundException: 110core:models/item/110core.hektometer.json You haven't shown your code, but it looks like you're putting your domain (mod id) into the path part of your resource location (in addition to the domain part, where it actually belongs). Edited November 1, 20177 yr by desht
November 1, 20177 yr Author Well this is my code: the block class: https://pastebin.com/6t66QMgm the class where I register my block: https://pastebin.com/3wf499Wx and the client proxy class: https://pastebin.com/MDTN3f7t
November 1, 20177 yr Yeah, I can see a few problems here offhand... Stop using getItemModelMesher() and start using setCustomModelResourceLocation(). And do your model registration in an event handler for ModelRegistryEvent. Don't use upper- or mixed-case resource locations. "blockHektometer" is bad, "block_hektometer" is good. Using getUnlocalizedName() to determine the model resource location like you do in ModBlocks#registerRender() is horrible practice. The block/item registry name should be considered the source of truth, not the translation key. (So derive your translation keys and model resource locations from your registry names) Start using RegistryEvent.Register<Block> / RegistryEvent.Register<Item> for registering your blocks and items (and other resources like sounds...), and move away from doing that explicitly in an init() method. See https://mcforge.readthedocs.io/en/latest/concepts/registries/. Edited November 1, 20177 yr by desht
November 1, 20177 yr Um, this stuff: 25 minutes ago, desht said: getItemModelMesher() -> setCustomModelResourceLocation(). -> And do your model registration in an event handler for ModelRegistryEvent. "blockHektometer" -> "block_hektometer" getUnlocalizedName() -> registry name -> Start using RegistryEvent.Register<Block> / RegistryEvent.Register<Item> See https://mcforge.readthedocs.io/en/latest/concepts/registries/. Edited November 1, 20177 yr by Draco18s Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
November 1, 20177 yr Author Well I did everything he said but it won´t work. What am I doing wrong???? Alo I did everything this turorial said but it didn´t work: https://wiki.mcjty.eu/modding/index.php/Render_Block_OBJ-1.9 (I know that it is for 1.9 but I thought it should work for 1.10 too)
November 1, 20177 yr Ok, so, one, that tutorial is out of date Two, that tutorial does some awful, awful things. Show your main class. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
November 1, 20177 yr Despite the versioning on McJty's tutorials, his 1.12 series is much better, and still applies as long as you're on a recent 1.10.2 version of Forge (which you should be). https://wiki.mcjty.eu/modding/index.php/Rendering-1.12 Edited November 1, 20177 yr by desht
November 1, 20177 yr Author ok I´ll try out the 1.12 version of his tutorial and make my classes look a bit nicer
November 1, 20177 yr Author ok...... I made everything exactly like the tutorial but I still get the same error. And what does this mean: "Caused by: java.io.FileNotFoundException: 110core:models/item/block_hektometer.json" ?
November 1, 20177 yr FileNotFoundExceptions mean that the file....was not found Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
November 1, 20177 yr Author I know but why does it search for this file? I‘ve never said that it should do that. I mean I never programmed it.
November 1, 20177 yr How do you expect to display the item in the inventory? By registering an item model. And where do you think it goes to go find that model? At the resource location you give it. So what does it expect to find there? A JSON file. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
November 1, 20177 yr You need an item model that has a parent of the block model's json Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.