Skip to content

Commit

Permalink
Use vanilla shadow rendering as it looks better with colored text (an…
Browse files Browse the repository at this point in the history
…d I didn't see any issues, so likely Mojang fixed it)
  • Loading branch information
Patbox committed Aug 11, 2023
1 parent 2fe0340 commit 9d32400
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 9d32400

Please sign in to comment.