Remove hacks for triggering adjacent light refill

This commit is contained in:
Dylan K. Taylor
2019-01-13 14:17:56 +00:00
parent 82788774b0
commit 1dca9074d5
2 changed files with 10 additions and 12 deletions

View File

@ -72,13 +72,13 @@ abstract class LightUpdate{
if($oldLevel !== $newLevel){
$this->setLight($x, $y, $z, $newLevel);
if($oldLevel < $newLevel){ //light increased
$this->spreadVisited[$blockHash] = true;
$this->spreadQueue->enqueue([$x, $y, $z]);
}else{ //light removed
$this->removalVisited[$blockHash] = true;
$this->removalQueue->enqueue([$x, $y, $z, $oldLevel]);
}
}
if($newLevel > $oldLevel){ //light increased
$this->spreadVisited[$blockHash] = true;
$this->spreadQueue->enqueue([$x, $y, $z]);
}elseif($newLevel < 15){ //light removed or stayed the same, force recheck nearby environment
$this->removalVisited[$blockHash] = true;
$this->removalQueue->enqueue([$x, $y, $z, $oldLevel]);
}
}
}