Chunk: Do not mark as changed on lighting updates

Since we don't save light to disk anymore, we don't need to care if a light update took place. This improves I/O performance.
This commit is contained in:
Dylan K. Taylor 2019-03-14 16:34:14 +00:00
parent 62185d476b
commit a91f49220c

View File

@ -229,9 +229,7 @@ class Chunk{
* @param int $level 0-15
*/
public function setBlockSkyLight(int $x, int $y, int $z, int $level) : void{
if($this->getSubChunk($y >> 4, true)->setBlockSkyLight($x, $y & 0x0f, $z, $level)){
$this->hasChanged = true;
}
$this->getSubChunk($y >> 4, true)->setBlockSkyLight($x, $y & 0x0f, $z, $level);
}
/**
@ -267,9 +265,7 @@ class Chunk{
* @param int $level 0-15
*/
public function setBlockLight(int $x, int $y, int $z, int $level) : void{
if($this->getSubChunk($y >> 4, true)->setBlockLight($x, $y & 0x0f, $z, $level)){
$this->hasChanged = true;
}
$this->getSubChunk($y >> 4, true)->setBlockLight($x, $y & 0x0f, $z, $level);
}
/**