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
@@ -2,6 +2,8 @@ window.Block = class {
static blocks = new Map();
static lightOpacity = [];
static create() {
Block.STONE = new BlockStone(1, 0);
Block.GRASS = new BlockGrass(2, 1);
@@ -20,6 +22,7 @@ window.Block = class {
// Register block
Block.blocks.set(id, this);
Block.lightOpacity[id] = this.isSolid() ? 255 : 0;
}
getId() {