mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Prevent attempting to calculate lighting changes below y = 0 (#201)
This commit is contained in:
parent
a63020d6e5
commit
6d2a57f83a
@ -1319,6 +1319,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
}
|
||||
|
||||
private function computeRemoveBlockLight(int $x, int $y, int $z, int $currentLight, \SplQueue $queue, \SplQueue $spreadQueue, array &$visited, array &$spreadVisited){
|
||||
if($y < 0) return;
|
||||
$current = $this->getBlockLightAt($x, $y, $z);
|
||||
|
||||
if($current !== 0 and $current < $currentLight){
|
||||
@ -1339,6 +1340,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
}
|
||||
|
||||
private function computeSpreadBlockLight(int $x, int $y, int $z, int $currentLight, \SplQueue $queue, array &$visited){
|
||||
if($y < 0) return;
|
||||
$current = $this->getBlockLightAt($x, $y, $z);
|
||||
|
||||
if($current < $currentLight){
|
||||
|
Loading…
x
Reference in New Issue
Block a user