From a91f49220cc02d6c180e9321810aad051e34655a Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 14 Mar 2019 16:34:14 +0000 Subject: [PATCH] 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. --- src/pocketmine/level/format/Chunk.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/pocketmine/level/format/Chunk.php b/src/pocketmine/level/format/Chunk.php index e1555dd8fb..efa0819ac6 100644 --- a/src/pocketmine/level/format/Chunk.php +++ b/src/pocketmine/level/format/Chunk.php @@ -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); } /**