disable light updates on chunk load

This commit is contained in:
LabyStudio
2022-02-01 12:53:33 +01:00
parent a0e6d00bf5
commit b4b6f4a762
2 changed files with 16 additions and 16 deletions
+2
View File
@@ -99,6 +99,7 @@ window.Minecraft = class {
if (button === 0) {
if (hitResult != null) {
this.world.setBlockAt(hitResult.x, hitResult.y, hitResult.z, 0);
this.world.updateBlockLightAt(hitResult.x, hitResult.y, hitResult.z);
}
}
@@ -124,6 +125,7 @@ window.Minecraft = class {
// Don't place blocks if the player is standing there
if (!placedBoundingBox.intersects(this.player.boundingBox)) {
this.world.setBlockAt(x, y, z, this.pickedBlock);
this.world.updateBlockLightAt(x, y, z);
}
}
}