Jump to content

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


Durand1w

Recommended Posts

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.

Link to comment
Share on other sites

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/

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.