Jump to content

[Solved] [1.9] Too many model combinations.


wehttam664

Recommended Posts

I'm currently trying to work with the forge block states to create a block model, but it has become evidently clear by the game's startup time I need to do it a better way.

 

I'm trying to render a number of different pieces with the system: 8 corners, 4 pillars, 8 bars, and a core can all be there or not plus the core has an int property ranging from 0-2. This totals the number of possible combinations (and thus the number of models loaded by the bakery) to 3*(2^21), which is just under 6.3 million possible combinations.

 

This is obviously not acceptable. Is there a better way to do this?

Link to comment
Share on other sites

I've looked through that. Each sub-model needs its own property since each individual model can either be there or not independent of the others.

 

I've decided to go with a custom IBakedModel implementation for those parts since I figured out how to get the TileEntity into the bake method. That works better and doesn't cause load times to skyrocket.

Link to comment
Share on other sites

8 corners, 4 pillars, 8 bars, and a core can all be there or not plus the core has an int property ranging from 0-2. This totals the number of possible combinations (and thus the number of models loaded by the bakery) to 3*(2^21), which is just under 6.3 million

I count 3*(2^9). That's still daunting, but not millions. Did I miss something?

 

Depending on what each state does, you may benefit from Forge's advanced blockstates.

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

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.