mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Further refactors to prepare for y=-64 lower limit
This commit is contained in:
@ -96,9 +96,9 @@ class SubChunk{
|
||||
return $this->blockLayers;
|
||||
}
|
||||
|
||||
public function getHighestBlockAt(int $x, int $z) : int{
|
||||
public function getHighestBlockAt(int $x, int $z) : ?int{
|
||||
if(count($this->blockLayers) === 0){
|
||||
return -1;
|
||||
return null;
|
||||
}
|
||||
for($y = 15; $y >= 0; --$y){
|
||||
if($this->blockLayers[0]->get($x, $y, $z) !== $this->emptyBlockId){
|
||||
@ -106,7 +106,7 @@ class SubChunk{
|
||||
}
|
||||
}
|
||||
|
||||
return -1; //highest block not in this subchunk
|
||||
return null; //highest block not in this subchunk
|
||||
}
|
||||
|
||||
public function getBlockSkyLightArray() : LightArray{
|
||||
|
Reference in New Issue
Block a user