diff --git a/src/pocketmine/level/Level.php b/src/pocketmine/level/Level.php index 6bee97008..8c025b4f8 100644 --- a/src/pocketmine/level/Level.php +++ b/src/pocketmine/level/Level.php @@ -1404,14 +1404,14 @@ class Level implements ChunkManager, Metadatable{ $this->timings->doBlockSkyLightUpdates->startTiming(); $oldHeightMap = $this->getHeightMap($x, $z); - $sourceId = $this->getBlockIdAt($x, $y, $z); + $source = $this->getBlockAt($x, $y, $z); $yPlusOne = $y + 1; if($yPlusOne === $oldHeightMap){ //Block changed directly beneath the heightmap. Check if a block was removed or changed to a different light-filter. $newHeightMap = $this->getChunk($x >> 4, $z >> 4)->recalculateHeightMapColumn($x & 0x0f, $z & 0x0f); }elseif($yPlusOne > $oldHeightMap){ //Block changed above the heightmap. - if(BlockFactory::$lightFilter[$sourceId] > 1 or BlockFactory::$diffusesSkyLight[$sourceId]){ + if($source->getLightFilter() > 0 or $source->diffusesSkyLight()){ $this->setHeightMap($x, $z, $yPlusOne); $newHeightMap = $yPlusOne; }else{ //Block changed which has no effect on direct sky light, for example placing or removing glass.