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

Hi togehter,

 

In my mod I define an item-class which is used for several items with different properties.

Every single kind of this item has an own unlocalized name ("item_diarybook_digger_day_" + an integer) - but every kind of the item has the same texture.

 

Then I try to register the item using

 Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(ModItems.item_diarybook_digger[i], 0, new ModelResourceLocation(modid + ":item_diarybook_digger", "inventory"));

 

I hoped that a single Model-Definition, named "item_diarybook_digger.json" can be used, but I get the model definition not found error

 

[Client thread/ERROR] [FML]: Exception loading model for variant testmod:item_diarybook_digger_day_365#inventory for item "testmod:item_diarybook_digger_day_365"
java.lang.Exception: Could not load model definition for variant testmod:item_diarybook_digger_day_365#inventory

 

Is it possible to use one model-definition file for serveral items? If so: What I'm doing wrong?

 

Thanks and best,

 

minquist

Wait, you are making 365 different items? Why not use metadata?

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

  • Author

Yes, it is totally possible.

What are you doing wrong?

  • How is the unlocalized name relevant here?
  • Use
    ModelLoader.setCustomModelResourceLocation

    in preInit, not the

    ItemModelMesher

    .

  • Why generate the ModelResourceLocation painfully manually like that?
    new ModelResourceLocation(item.getRegistryName(), "inventory")

    will work fine and allow you to use the same for every item.

  • Why are you still on 1.8.9?

 

If that does not fix it, post more of your code.

 

Thanks, that helped a lot. Don't know really why it was a problem. ;-)

 

We are using 1.8.9 because we don't want to have some 1.9 and 1.10 features of Minecraft within our project.

  • Author

Wait, you are making 365 different items? Why not use metadata?

 

Don't worry, I am using metadata for that. My question was a general question. ;-)

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.