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

Hi,

I want to use the TileEntityRenderer, to render just the top side of the block, so just a flat quad with top texture of the block. Is it possible in 1.16.2?

I already looked at the BotanyPots mod's code and it's using the

private void renderQuadsFlat(IBlockDisplayReader blockAccessIn, BlockState stateIn, BlockPos posIn, int brightnessIn, int combinedOverlayIn, boolean ownBrightness, MatrixStack matrixStackIn, IVertexBuilder buffer, List<BakedQuad> list, BitSet bitSet)

from BlockModelRenderer class.

But in 1.16.2 it looks like it's a private function and I cannot use it.

  • Author
5 minutes ago, ChampionAsh5357 said:

I mean you can just as easily do this with a regular block model by not drawing the other 5 sides. Same with using the method above. Hasn't changed.

I have never used Tile Entity Rendering before, so I'm new to this part of modding, could you say how to do it?

9 minutes ago, Corgam said:

But in 1.16.2 it looks like it's a private function and I cannot use it.

If you want to do it that way, you'll need AT or reflection to access it

  • Author

I just found out that one way to do it is to use matrix.scale() and squeeze the block almost into a plane, but it still renders all sided of the block, so it's not efficient.

  • Author
27 minutes ago, ChampionAsh5357 said:

Are you trying to do this for your block or a generic one?

Stone, endstone, magma block ect;.

So the idea is that I can put ItemStack inside of my block and it will render the block from that stack.

Edited by Corgam

Then you could just reuse the processes needed to get the BakedQuad in the upwards direction from the IBakedModel of each Block from the class you are referencing. I would recommend caching this data when applicable.

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.