From 9d32400a9956f9c67a7b8ee357fc2a42aaed68e8 Mon Sep 17 00:00:00 2001 From: Patbox <39821509+Patbox@users.noreply.github.com> Date: Fri, 11 Aug 2023 16:58:28 +0200 Subject: [PATCH] Use vanilla shadow rendering as it looks better with colored text (and I didn't see any issues, so likely Mojang fixed it) --- .../render/block/entity/TextBlockEntityRenderer.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/main/java/dev/hephaestus/glowcase/client/render/block/entity/TextBlockEntityRenderer.java b/src/main/java/dev/hephaestus/glowcase/client/render/block/entity/TextBlockEntityRenderer.java index 81b87d6..682e7b0 100644 --- a/src/main/java/dev/hephaestus/glowcase/client/render/block/entity/TextBlockEntityRenderer.java +++ b/src/main/java/dev/hephaestus/glowcase/client/render/block/entity/TextBlockEntityRenderer.java @@ -72,15 +72,7 @@ public void renderBaked(TextBlockEntity blockEntity, MatrixStack matrices, Verte matrices.translate(0, 0, 0.025D); } - if (blockEntity.shadowType == TextBlockEntity.ShadowType.DROP) { - // Don't use the vanilla shadow rendering - it breaks when you try to use it in 3D - int shadowColor = 0x88000000; - matrices.translate(0, 0, -0.025D); - textRenderer.draw(blockEntity.lines.get(i), 1, (i * 12) + 1, shadowColor, false, matrices.peek().getPositionMatrix(), vertexConsumers, TextLayerType.NORMAL, 0, LightmapTextureManager.MAX_LIGHT_COORDINATE); - matrices.translate(0, 0, 0.025D); - } - - textRenderer.draw(blockEntity.lines.get(i), 0, i * 12, blockEntity.color, false, matrices.peek().getPositionMatrix(), vertexConsumers, TextLayerType.NORMAL, 0, LightmapTextureManager.MAX_LIGHT_COORDINATE); + textRenderer.draw(blockEntity.lines.get(i), 0, i * 12, blockEntity.color, blockEntity.shadowType == TextBlockEntity.ShadowType.DROP, matrices.peek().getPositionMatrix(), vertexConsumers, TextLayerType.NORMAL, 0, LightmapTextureManager.MAX_LIGHT_COORDINATE); matrices.pop(); }