From 41fd03f329cd108381001dcb69d66ffa873e3bd9 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 19 Oct 2018 16:55:32 +0100 Subject: [PATCH] LightUpdate: fixed double-updated nodes not getting light propagated appropriately This can happen when a light source is removed and later encountering another light source to fill the gap. A higher light level may get set and then not propagated. This bug is difficult to explain, but fairly easy to reproduce. --- src/pocketmine/level/light/LightUpdate.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pocketmine/level/light/LightUpdate.php b/src/pocketmine/level/light/LightUpdate.php index 6e82d2f68..9934492a3 100644 --- a/src/pocketmine/level/light/LightUpdate.php +++ b/src/pocketmine/level/light/LightUpdate.php @@ -106,6 +106,8 @@ abstract class LightUpdate{ while(!$this->spreadQueue->isEmpty()){ list($x, $y, $z) = $this->spreadQueue->dequeue(); + unset($this->spreadVisited[Level::blockHash($x, $y, $z)]); + if(!$this->subChunkHandler->moveTo($x, $y, $z)){ continue; }