mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 16:51:42 +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 $compressionLevel;
|
||||
|
||||
public function __construct(Level $level, Chunk $chunk){
|
||||
$this->levelId = $level->getId();
|
||||
$this->compressionLevel = $level->getServer()->networkCompressionLevel;
|
||||
|
||||
$this->chunk = $chunk->fastSerialize();
|
||||
$this->chunkX = $chunk->getX();
|
||||
@ -75,7 +72,7 @@ class ChunkRequestTask extends AsyncTask{
|
||||
|
||||
$batch = new BatchPacket();
|
||||
$batch->addPacket($pk);
|
||||
$batch->setCompressionLevel($this->compressionLevel);
|
||||
$batch->setCompressionLevel(9);
|
||||
$batch->encode();
|
||||
|
||||
$this->setResult($batch->buffer, false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user