mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-12 16:59:44 +00:00
Level: fix light removal bugs caused by 48a5eeb3a459cb90b302990d3f243a34b0bb7da0 and 19e68f98a707536866c33bb1e9fad9f7c280447d
BlockFactory::\$lightFilter and Block->getLightFilter() are not equivalent.
This commit is contained in:
parent
7642298b4f
commit
93b8a6c44a
@ -1418,7 +1418,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
$this->skyLightUpdate->setAndUpdateLight($x, $i, $z, 15);
|
||||
}
|
||||
}else{ //No heightmap change, block changed "underground"
|
||||
$this->skyLightUpdate->setAndUpdateLight($x, $y, $z, max(0, $this->getHighestAdjacentBlockSkyLight($x, $y, $z) - $source->getLightFilter()));
|
||||
$this->skyLightUpdate->setAndUpdateLight($x, $y, $z, max(0, $this->getHighestAdjacentBlockSkyLight($x, $y, $z) - BlockFactory::$lightFilter[($source->getId() << 4) | $source->getDamage()]));
|
||||
}
|
||||
|
||||
$this->timings->doBlockSkyLightUpdates->stopTiming();
|
||||
@ -1448,7 +1448,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
$this->timings->doBlockLightUpdates->startTiming();
|
||||
|
||||
$block = $this->getBlockAt($x, $y, $z);
|
||||
$newLevel = max($block->getLightLevel(), $this->getHighestAdjacentBlockLight($x, $y, $z) - $block->getLightFilter());
|
||||
$newLevel = max($block->getLightLevel(), $this->getHighestAdjacentBlockLight($x, $y, $z) - BlockFactory::$lightFilter[($block->getId() << 4) | $block->getDamage()]);
|
||||
|
||||
if($this->blockLightUpdate === null){
|
||||
$this->blockLightUpdate = new BlockLightUpdate($this);
|
||||
|
Loading…
x
Reference in New Issue
Block a user