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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Remove Instant Massive Structures Mod from your server     Add new crash-reports with sites like https://paste.ee/  
    • Update your drivers: https://www.amd.com/en/support/graphics/amd-radeon-r9-series/amd-radeon-r9-200-series/amd-radeon-r9-280x
    • Add the crash-report or latest.log (logs-folder) with sites like https://paste.ee/ and paste the link to it here  
    • I have made a post shader with all of it's files (in post and program) being finished, it's just an edited creeper post shader for now. How do I load it ingame?  Minecraft.getInstance().gameRenderer.loadEffect(new ResourceLocation("thedefused:shaders/post/creep.json")); This just gives an error due to it trying to find program in minecraft:shaders/program However, I have seen multiple mods use post shaders. how?
    • Hello. I've been having a problem when launching minecraft forge. It just doesn't open the game, and leaves me with this "(exit code 1)" error. Both regular and optifine versions of minecraft launch just fine, tried both with 1.18.2 and 1.20.1. I can assure that my drivers are updated so that can't be it, and i've tried using Java 17, 18 and 21 to no avail. Even with no mods installed, the thing won't launch. I'll leave the log here, although it's in spanish: https://jmp.sh/s/FPqGBSi30fzKJDt2M1gc My specs are this: Ryzen 3 4100 || Radeon R9 280x || 16gb ram || Windows 10 I'd appreciate any help, thank you in advance.
×
×
  • Create New...

Important Information

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