From 64b3d0297478913a09a1381b8f1554c68d8fb0ff Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 29 Jan 2020 16:42:42 +0000 Subject: [PATCH] Chunk: remove useless condition from populateSkyLight() this was detected by latest bleeding-edge PHPStan. --- src/pocketmine/level/format/Chunk.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/pocketmine/level/format/Chunk.php b/src/pocketmine/level/format/Chunk.php index 0d0a284dd..39ce3d2b9 100644 --- a/src/pocketmine/level/format/Chunk.php +++ b/src/pocketmine/level/format/Chunk.php @@ -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); }