mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Added Empty chunk detection
This commit is contained in:
@ -233,7 +233,11 @@ abstract class BaseChunk implements Chunk{
|
||||
}
|
||||
|
||||
public function setSection($fY, ChunkSection $section){
|
||||
$this->sections[(int) $fY] = $section;
|
||||
if(substr_count($section->getIdArray(), "\x00") === 4096 and substr_count($section->getDataArray(), "\x00") === 2048){
|
||||
$this->sections[(int) $fY] = new EmptyChunkSection($fY);
|
||||
}else{
|
||||
$this->sections[(int) $fY] = $section;
|
||||
}
|
||||
}
|
||||
|
||||
public function addEntity(Entity $entity){
|
||||
|
Reference in New Issue
Block a user