mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-10 13:35:29 +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 .= Binary::writeInt($color);
|
||||
}
|
||||
$biomeColors = $this->biomeColors;
|
||||
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);
|
||||
|
||||
|
@ -122,11 +122,9 @@ class McRegion extends BaseLevelProvider{
|
||||
}
|
||||
}
|
||||
|
||||
$biomeColors = "";
|
||||
|
||||
foreach($chunk->getBiomeColorArray() as $color){
|
||||
$biomeColors .= Binary::writeInt($color);
|
||||
}
|
||||
$biomeColors = $chunk->getBiomeColorArray();
|
||||
array_unshift($biomeColors, "N*");
|
||||
$biomeColors = call_user_func_array("pack", $biomeColors);
|
||||
|
||||
$ordered = zlib_encode(
|
||||
Binary::writeLInt($x) . Binary::writeLInt($z) .
|
||||
|
Loading…
x
Reference in New Issue
Block a user