recode mojang lightning

This commit is contained in:
LabyStudio
2022-02-02 12:46:08 +01:00
parent 14c13297fb
commit f1b6779221
6 changed files with 208 additions and 121 deletions
@@ -47,7 +47,7 @@ window.BlockRenderer = class {
// Classic lightning
if (BlockRenderer.CLASSIC_LIGHTNING) {
let brightness = 0.9 / 15.0 * world.getLightAt(minX + face.x, minY + face.y, minZ + face.z) + 0.1;
let brightness = 0.9 / 15.0 * world.getTotalLightAt(minX + face.x, minY + face.y, minZ + face.z) + 0.1;
let color = brightness * face.getShading();
this.tessellator.setColor(color, color, color);
}