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

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!

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.

  • Author

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.

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.