fix lightning bug
This commit is contained in:
@@ -231,7 +231,6 @@ window.Minecraft = class {
|
||||
}
|
||||
|
||||
isPaused() {
|
||||
return false;
|
||||
//return !this.hasInGameFocus() && this.loadingScreen === null;
|
||||
return !this.hasInGameFocus() && this.loadingScreen === null;
|
||||
}
|
||||
}
|
||||
@@ -311,9 +311,9 @@ window.Player = class {
|
||||
let sneaking = false;
|
||||
|
||||
if (this.minecraft.hasInGameFocus()) {
|
||||
/*if (Keyboard.isKeyDown("KeyR")) { // R
|
||||
this.respawn();
|
||||
}*/
|
||||
if (Keyboard.isKeyDown("KeyR")) { // R
|
||||
// this.respawn();
|
||||
}
|
||||
if (Keyboard.isKeyDown("KeyW")) { // W
|
||||
moveForward++;
|
||||
}
|
||||
|
||||
@@ -235,6 +235,9 @@ window.World = class {
|
||||
|
||||
let section = this.getChunkSectionAt(x >> 4, y >> 4, z >> 4)
|
||||
section.setLightAt(sourceType, x & 15, y & 15, z & 15, lightLevel);
|
||||
|
||||
// Rebuild chunk
|
||||
this.onBlockChanged(x, y, z);
|
||||
}
|
||||
|
||||
isSolidBlockAt(x, y, z) {
|
||||
@@ -288,7 +291,7 @@ window.World = class {
|
||||
for (let x = minX; x <= maxX; x++) {
|
||||
for (let y = minY; y <= maxY; y++) {
|
||||
for (let z = minZ; z <= maxZ; z++) {
|
||||
if (this.chunkExists(x >> 4, z >> 4)) {
|
||||
if (this.chunkExists(x, z)) {
|
||||
this.getChunkSectionAt(x, y, z).isModified = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user