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

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?

  • 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.

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.

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.