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

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.

  • Author

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.

 

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.

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.