Posted February 7, 20223 yr For my mod, there is a clump of blocks that can only be seen when the player is wearing a certain item. I have succeeded in implementing that part: However, I would also like these block clumps to be "lit up" under any lighting conditions. I have tried setting properties on the block itself, but they don't seem to make any difference to the blocks rendered by the TileEntityRenderer: public static final Properties PROPS = Properties. copy(Blocks.AIR). noOcclusion(). lightLevel((BlockState bs) -> 10). emissiveRendering( (BlockState bs, IBlockReader r, BlockPos p) -> true ); Here's my TileEntityRenderer code (source): @Override public void render( TraparWaveBlock.TileEntity te, float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int combinedLightIn, int combinedOverlayIn ) { ClientPlayerEntity player = mc.player; ItemStack helmet = player.getItemBySlot(EquipmentSlotType.HEAD); if (helmet.isEmpty()) { return; } for (BlockPos p : te.getShape().getAsRelativeBlockPositions()) { renderBlock(p, matrixStackIn, bufferIn, 1.0f); } } private void renderBlock(Vector3i translation, MatrixStack matrixStack, IRenderTypeBuffer buffer, float scale) { matrixStack.pushPose(); matrixStack.translate( translation.getX(), translation.getY(), translation.getZ() ); matrixStack.scale(scale, scale, scale); BlockState bs = BlocksInit.TRAPAR_WAVE_CHILD_BLOCK.get(). defaultBlockState(); mc.getBlockRenderer().renderBlock( bs, matrixStack, buffer, Integer.MAX_VALUE, OverlayTexture.NO_OVERLAY, EmptyModelData.INSTANCE ); matrixStack.popPose(); } I have also tried calling `RenderHelper.turnOff()` and `RenderHelper.turnBackOn()` wrapped around the "renderBlock" code. No joy. Can anyone help me out? I'd like these blocks to be "full bright" at all times. Thanks. Edited February 7, 20223 yr by bradsk88 More details
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.