Jump to content

[1.8] [SOLVED] Transparent ground under custom model?


Recommended Posts

Posted

So, I was playing around with models and it occured to me that making normal blocks was easy, so I decided to make a custom model.

My problem is that the ground underneath the model is transparent, and I don't know why..?

 

FpQIs02.png

GameSlayar

Forgive my noobiness!

Posted

Minecraft assumes that every block is an opaque cube by default, so it doesn't render any adjacent block faces that wouldn't be visible.

 

You need to override

Block#isOpaqueCube

to return

false

for any block that isn't an opaque cube, this tells Minecraft to always render the adjacent block faces.

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.

Posted

Because I'm kinda new to modelling in MC, could you tell me how I would override

Block#isOpaqueCube

?

Would it be in any of the .JSON files or somewhere in the code itself?

 

 

EDIT: Actually, I figured it out. It was in the code, under the block class. Thanks for your help!

 

//For rendering of block underneath
@Override
public boolean isOpaqueCube() {
return false;
}

//For correct lighting around the block
@Override
public boolean isFullCube() {
return false;
}

GameSlayar

Forgive my noobiness!

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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