Chunk: remove useless condition from populateSkyLight()

this was detected by latest bleeding-edge PHPStan.
This commit is contained in:
Dylan K. Taylor 2020-01-29 16:42:42 +00:00
parent 640df1003c
commit 64b3d02974

View File

@ -440,11 +440,9 @@ class Chunk{
$light = 15;
for(; $y >= 0; --$y){
if($light > 0){
$light -= BlockFactory::$lightFilter[$this->getBlockId($x, $y, $z)];
if($light <= 0){
break;
}
$light -= BlockFactory::$lightFilter[$this->getBlockId($x, $y, $z)];
if($light <= 0){
break;
}
$this->setBlockSkyLight($x, $y, $z, $light);
}