mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 14:35:35 +00:00
Improved chunk sending
This commit is contained in:
parent
35b86af2af
commit
d169734781
@ -100,9 +100,9 @@ class ChunkRequestTask extends AsyncTask{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($this->biomeColors as $color){
|
$biomeColors = $this->biomeColors;
|
||||||
$biomeColors .= Binary::writeInt($color);
|
array_unshift($biomeColors, "N*");
|
||||||
}
|
$biomeColors = call_user_func_array("pack", $biomeColors);
|
||||||
|
|
||||||
$ordered = zlib_encode(Binary::writeLInt($this->chunkX) . Binary::writeLInt($this->chunkZ) . $orderedIds . $orderedData . $orderedSkyLight . $orderedLight . $this->biomeIds . $biomeColors . $this->tiles, ZLIB_ENCODING_DEFLATE, $this->compressionLevel);
|
$ordered = zlib_encode(Binary::writeLInt($this->chunkX) . Binary::writeLInt($this->chunkZ) . $orderedIds . $orderedData . $orderedSkyLight . $orderedLight . $this->biomeIds . $biomeColors . $this->tiles, ZLIB_ENCODING_DEFLATE, $this->compressionLevel);
|
||||||
|
|
||||||
|
@ -122,11 +122,9 @@ class McRegion extends BaseLevelProvider{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$biomeColors = "";
|
$biomeColors = $chunk->getBiomeColorArray();
|
||||||
|
array_unshift($biomeColors, "N*");
|
||||||
foreach($chunk->getBiomeColorArray() as $color){
|
$biomeColors = call_user_func_array("pack", $biomeColors);
|
||||||
$biomeColors .= Binary::writeInt($color);
|
|
||||||
}
|
|
||||||
|
|
||||||
$ordered = zlib_encode(
|
$ordered = zlib_encode(
|
||||||
Binary::writeLInt($x) . Binary::writeLInt($z) .
|
Binary::writeLInt($x) . Binary::writeLInt($z) .
|
||||||
|
Loading…
x
Reference in New Issue
Block a user