Jump to content

[1.10.2] Submodels within another model?


OreCruncher

Recommended Posts

I have a block that has several variants:

 

1. The first variant has a simple "cross" model with a texture.  I finally have that block rendering in world as well as inventory.  Yay!

 

2. The second variant is an entirely different model.  What I want to do is use existing models from Vanilla as sub-models to build a composite.  (I want to make a bone pile using the item "bone" and "skull".)

 

I see that the blockstate json has this an ability to do sub-models based on state.  In my case I just want to build a model reusing existing models as building blocks, and refer to that composite model  from the blockstate.  The only attribute that can alter rendering of the model is a rotation around Y, but that can be handled easily up in the blockstate and would (generally) apply to any models that it refers to.

 

Anyways, I was wondering if what I want is possible, or do I need to go back and rethink this.  From Java implementation standpoint all these blocks have the same capabilities.  The only thing that is changing is what they look like in the world based on the variant type.

Link to comment
Share on other sites

You will probably want to look at Forge's MultiLayerModels.

Some information, and examples, can be read here: WillieWillus : Forge Rendering Primer

Scroll down to where he talks about Aura Cascade’s Fortified Blocks.

 

Heavily recommend that you read the whole primer. It's good material to learn the system that has been used since 1.8 to render.

 

Edit: seems the link in the primer to Aura Cascade's multi-layer example returns a 404; so here's a direct link

Also previously known as eAndPi.

"Pi, is there a station coming up where we can board your train of thought?" -Kronnn

Published Mods: Underworld

Handy links: Vic_'s Forge events Own WIP Tutorials.

Link to comment
Share on other sites

Yes.  Saw that.  It shows it being used in the BlockState Json.  What I want to do is make a "normal" model file that has submodels, and then refer to *that* Json from the BlockState Json.  It's not clear to me if this is possible.

 

This being said I dropped back and punted to keep things simple.  I decided I didn't want to tackle this particular challenge for the moment.  What I wound up doing is using Choonster's BlockSappling example and modeled (no pun intended) my BlockState off of that.

 

Link to comment
Share on other sites

The idea of "submodels" are specifically related to the Blockstate Json. You can't do "submodels" in a model 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.

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



×
×
  • Create New...

Important Information

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