implement mojang lightning of a1.2.6
This commit is contained in:
@@ -81,6 +81,8 @@ window.Minecraft = class {
|
||||
|
||||
// Render the game
|
||||
this.worldRenderer.render(partialTicks);
|
||||
|
||||
while (this.world.updateLights()) ;
|
||||
}
|
||||
|
||||
onTick() {
|
||||
@@ -99,7 +101,6 @@ 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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +126,6 @@ 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user