fix water lightning

This commit is contained in:
LabyStudio
2022-02-02 15:38:15 +01:00
parent 010d883273
commit c5fd75de47
5 changed files with 32 additions and 14 deletions
@@ -32,7 +32,8 @@ window.MetadataChunkBlock = class {
let savedLightValue = world.getSavedLightValue(this.type, x, y, z);
let newLevel = 0;
let typeId = world.getBlockAt(x, y, z);
let opacity = Block.lightOpacity[typeId];
let block = Block.getById(typeId);
let opacity = typeId === 0 ? 0 : block.getOpacity() * 255;
if (opacity === 0) {
opacity = 1;