mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Chunk: stop exposing SplFixedArray<SubChunk> to the API
this fixes a large number of PHPStan errors, and also brings us a step closer to negative-build-height readiness.
This commit is contained in:
@ -46,7 +46,7 @@ final class ChunkSerializer{
|
||||
* Chunks are sent in a stack, so every chunk below the top non-empty one must be sent.
|
||||
*/
|
||||
public static function getSubChunkCount(Chunk $chunk) : int{
|
||||
for($count = $chunk->getSubChunks()->count(); $count > 0; --$count){
|
||||
for($count = count($chunk->getSubChunks()); $count > 0; --$count){
|
||||
if($chunk->getSubChunk($count - 1)->isEmptyFast()){
|
||||
continue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user