Always use best compression for chunks

This commit is contained in:
Dylan K. Taylor 2017-09-30 20:30:24 +01:00
parent 9cd7f39c03
commit 42dd9d6abd

View File

@ -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);