Chunk: move protocol-specific getSubChunkSendCount() to network chunk serializer

This commit is contained in:
Dylan K. Taylor
2019-10-23 18:34:47 +01:00
parent 23e2e7c320
commit eedc9eaee1
3 changed files with 20 additions and 18 deletions

View File

@@ -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
*/