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; $light = 15;
for(; $y >= 0; --$y){ for(; $y >= 0; --$y){
if($light > 0){ $light -= BlockFactory::$lightFilter[$this->getBlockId($x, $y, $z)];
$light -= BlockFactory::$lightFilter[$this->getBlockId($x, $y, $z)]; if($light <= 0){
if($light <= 0){ break;
break;
}
} }
$this->setBlockSkyLight($x, $y, $z, $light); $this->setBlockSkyLight($x, $y, $z, $light);
} }