Posted September 16, 20205 yr 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.
September 16, 20205 yr 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.
September 16, 20205 yr 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?
September 16, 20205 yr 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
September 16, 20205 yr 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.
September 16, 20205 yr 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 September 16, 20205 yr by Corgam
September 16, 20205 yr 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.