Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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.

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 by desht

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 by desht

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 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.

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.

  • 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" ?

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.

  • 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.

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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.