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 so frustrated and mentally exhausted am not sure what I type here will make since.  :-\

 

My block has a few base models and several overlay models.

Before 1.8 I rendered the needed base, then rendered the needed overlay on top.

 

I have my json files build for both the bases and overlays, and tested (by directly setting them in the blockstate json, they load correctly).

My blocks BlockStates are correctly functioning.

 

I'm just down to rendering, but everything so far has failed.

 

I'm trying to read two json model files, and create a merged model from them, that I then can register to a blockstate.

 

I'm back to a blank slate.

 

Currently in ModelBakeEvent, I've grabbed all my base & overlays as ModelBlock.

 

 

 

EDIT:

Looks like I just needed a break ;)

 

Not sure if there is a better way but I did get it working.

 

 

Summery:

TextureStitchEvent.Pre

- Read json files to ModleBlock's

- Set parents for ModelBlocks's

- Read textures from ModelBlocks's and register for stitching

 

ModelBakeEvent

- Generate ModelResourceLocation

- Grab and bake needed base model and overlay model

- Merge models, new SimpleBakedModel based on base model with GeneralQuads and FaceQuads copied from both base and overlay

- Register to ModelRegistry

 

 

Edit2:

After further testing this method is not recommended.

It is much slower then having Minecraft load models listed the BlockState jsons.

 

While this would be useful for a large amount of possible combinations the ~2sec load time per model ends up being a significant delay and with few combinations there is no point in not using json files.

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.