Posted April 3, 20169 yr 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?
April 3, 20169 yr Take a look at the submodels section here: https://mcforge.readthedocs.org/en/latest/blockstates/forgeBlockstates/
April 3, 20169 yr Author 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.
April 4, 20169 yr 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.
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.