Jump to content

Cant get itemmodel of Block to render


tubs

Recommended Posts

Use ModelLoader.setCustomModelResourceLocation instead of the ItemModelMesher stuff, do it in preInit.

Aha, I've been seeing (frequently) the advice to use custom location, but not always the admonition "instead of mesher stuff". It's finally dawning on me that this choice is not just a personal preference. Is there an explanation somewhere of why the former is superior to the latter? (I searched, but the haystack of code excerpts swamped any hope of finding a comparison).

 

Having finally learned the mesher well enough to make it work in all of my mods, I'm feeling reluctant to dig them up and change them, but a good reason could persuade me to do so during my port to 1.9.

 

BTW, For grins, I just Googled Minecraft Forge 1.8 item model tutorial again. The top four tutorials all teach the deprecated mesher technique, so the parade of meshed up modders will continue :(  If there's a tut that teaches the model loader, I can't find it. I looked at Forge's docs, but the "Models & Rendering" section only mentions blocks, not items.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Link to comment
Share on other sites

Yes, all those tutorials were made in the very early days of 1.8 or just copy from each other without actually doing some research.

I am not quite sure what exactly the reason was again (but it is valid, fry "the rendering guy" explained it to me once on IRC), I assume it has something to do with the fact that ItemModelMesher caches the baked models when you register, which might then cache the wrong thing if not registered at the exact correct time. If you use ModelLoader the registrations into the ItemModelMesher are batched and guaranteed to happen at the correct time.

Link to comment
Share on other sites

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
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

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