mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
ChunkSerializer: fixed count calculation for non-overworld chunks
plugins that implement dimensions can't change the number of subchunks used by Chunk, they can only choose to use a subset of them.
This commit is contained in:
parent
169d3e0de8
commit
eaab1a8784
@ -71,7 +71,7 @@ final class ChunkSerializer{
|
||||
//if the protocol world bounds ever exceed the PM supported bounds again in the future, we might need to
|
||||
//polyfill some stuff here
|
||||
[$minSubChunkIndex, $maxSubChunkIndex] = self::getDimensionChunkBounds($dimensionId);
|
||||
for($y = $maxSubChunkIndex, $count = count($chunk->getSubChunks()); $y >= $minSubChunkIndex; --$y, --$count){
|
||||
for($y = $maxSubChunkIndex, $count = $maxSubChunkIndex - $minSubChunkIndex + 1; $y >= $minSubChunkIndex; --$y, --$count){
|
||||
if($chunk->getSubChunk($y)->isEmptyFast()){
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user