mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-03 08:39:53 +00:00
Always use best compression for chunks
This commit is contained in:
parent
9cd7f39c03
commit
42dd9d6abd
@ -42,11 +42,8 @@ class ChunkRequestTask extends AsyncTask{
|
|||||||
|
|
||||||
protected $tiles;
|
protected $tiles;
|
||||||
|
|
||||||
protected $compressionLevel;
|
|
||||||
|
|
||||||
public function __construct(Level $level, Chunk $chunk){
|
public function __construct(Level $level, Chunk $chunk){
|
||||||
$this->levelId = $level->getId();
|
$this->levelId = $level->getId();
|
||||||
$this->compressionLevel = $level->getServer()->networkCompressionLevel;
|
|
||||||
|
|
||||||
$this->chunk = $chunk->fastSerialize();
|
$this->chunk = $chunk->fastSerialize();
|
||||||
$this->chunkX = $chunk->getX();
|
$this->chunkX = $chunk->getX();
|
||||||
@ -75,7 +72,7 @@ class ChunkRequestTask extends AsyncTask{
|
|||||||
|
|
||||||
$batch = new BatchPacket();
|
$batch = new BatchPacket();
|
||||||
$batch->addPacket($pk);
|
$batch->addPacket($pk);
|
||||||
$batch->setCompressionLevel($this->compressionLevel);
|
$batch->setCompressionLevel(9);
|
||||||
$batch->encode();
|
$batch->encode();
|
||||||
|
|
||||||
$this->setResult($batch->buffer, false);
|
$this->setResult($batch->buffer, false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user