first working stuff

This commit is contained in:
LabyStudio
2022-02-02 14:46:53 +01:00
parent f1b6779221
commit 1fc627b501
4 changed files with 62 additions and 64 deletions
+5 -6
View File
@@ -21,10 +21,9 @@ window.Chunk = class {
// Create height map
this.heightMap = [];
this.initHeightMapAndLight();
}
initHeightMapAndLight() {
generateSkylightMap() {
let highest = World.TOTAL_HEIGHT;
for (let x = 0; x < 16; x++) {
for (let z = 0; z < 16; z++) {
@@ -160,6 +159,10 @@ window.Chunk = class {
this.getSection(y >> 4).setBlockAt(x, y & 15, z, byte0);
if (!this.loaded) {
return;
}
//if (k1 !== 0 && !this.worldObj.multiplayerWorld) {
//Block.blocksList[k1].onBlockRemoval(this.world, l1, j, i2);
//}
@@ -222,10 +225,6 @@ window.Chunk = class {
}
}
load() {
this.loaded = true;
}
isLoaded() {
return this.loaded;
}