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.

[1.9.4][1.10.2] Block Model Selective Transparency and Cutout Possible?

Featured Replies

Posted

I have a lantern block that I was hoping to use with stained glass, but the dilema is that CUTOUT, CUTOUT_MIPPED and TRANSPARENCY are defined at the block level, rather than as part of the .json model file by part.  I'm hoping to have the glass use TRANSPARENCY, while the metal parts of the lantern are the default Solid (or CUTOUT).  I thought this might have been possible using tintindex and iBlocks, which I have working for another block now, but I don't believe it can be used modified or used for that purpose.  If anyone can verify if it is possible and suggest a direction, it's greatly appreciated.  If it is not currently possible, that is okay as well since it will save me the time of chasing another solution.

 

width=800 height=450http://files.enjin.com/153233/images/forumposts/2016-09-28_06.29.38.png[/img]

 

Thanks for all the great post and tutorials.

Can't you just use

BlockRenderLayer.TRANSLUCENT

for the whole block?

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

  • Author

Yeah, that was my first hope.  The issue is that even the iron parts are treated as transparency.  If you move around the block, periodically parts of the iron will show the glass or candle inside.  I tried redesigning it several times to try to avoid the issue with no luck.  It also meant applying a texture to every part in the event that it would show through.  That is something I'll have to clean-up in the block model later.

Override

Block#canRenderInLayer(IBlockState, BlockRenderLayer)

to return

true

if the block can render in the specified layer, split your model into one model per layer and then use the

forge:multi-layer

model in your blockstates file.

 

This model takes the locations of the models to combine as custom data. The

"base"

model is used for the results of

IBakedModel#isGui3d

,

IBakedModel#isAmbientOcclusion

,

IBakedModel#isBuiltInRenderer

and

IBakedModel#getParticleTexture

. The

"Solid"

,

"Mipped Cutout"

,

"Cutout"

and

"Translucent"

models are the models used for those layers.

 

When rendered as an item, all models (including

"base"

) are rendered.

 

The Crystallizer from DeepResonance has an example of this.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

  • Author

I think that is exactly what I need.  Thank you!!!  I wasn't aware of that after a lot of online searching.

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.