implement block in hand

(cherry picked from commit 75fd4edd9f67b2cbf5abffc1ea417920106b1353)
This commit is contained in:
LabyStudio
2022-04-14 20:50:18 +02:00
parent 96b287bedc
commit 5c47dd6599
13 changed files with 145 additions and 68 deletions
@@ -33,7 +33,7 @@ window.MetadataChunkBlock = class {
let newLevel = 0;
let typeId = world.getBlockAt(x, y, z);
let block = Block.getById(typeId);
let opacity = typeId === 0 ? 0 : block.getOpacity() * 255;
let opacity = typeId === 0 ? 0 : Math.round(block.getOpacity() * 255);
if (opacity === 0) {
opacity = 1;