Jump to content

[1.16.2] Way to render only one side of block


Recommended Posts

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.

Posted
  On 9/16/2020 at 4:34 PM, 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.

Expand  

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

Posted

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.

Posted (edited)
  On 9/16/2020 at 5:00 PM, ChampionAsh5357 said:

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

Expand  

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

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.