Fixed a bug in light removal

This commit is contained in:
Dylan K. Taylor 2017-07-09 12:19:38 +01:00
parent 30c5487f94
commit 8cca8e1256

View File

@ -137,7 +137,7 @@ abstract class LightUpdate{
if($current !== 0 and $current < $oldAdjacentLevel){ if($current !== 0 and $current < $oldAdjacentLevel){
$this->setLight($x, $y, $z, 0); $this->setLight($x, $y, $z, 0);
if(!isset($visited[$index = Level::blockHash($x, $y, $z)])){ if(!isset($this->removalVisited[$index = Level::blockHash($x, $y, $z)])){
$this->removalVisited[$index] = true; $this->removalVisited[$index] = true;
if($current > 1){ if($current > 1){
$this->removalQueue->enqueue([$x, $y, $z, $current]); $this->removalQueue->enqueue([$x, $y, $z, $current]);