mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 04:15:04 +00:00
Chunk: move protocol-specific getSubChunkSendCount() to network chunk serializer
This commit is contained in:
@@ -682,22 +682,6 @@ class Chunk{
|
||||
return $this->subChunks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the count of subchunks that need sending to players
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getSubChunkSendCount() : int{
|
||||
for($count = $this->subChunks->count(); $count > 0; --$count){
|
||||
if($this->subChunks[$count - 1]->isEmptyFast()){
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return $count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disposes of empty subchunks and frees data where possible
|
||||
*/
|
||||
|
Reference in New Issue
Block a user