Improved batch handling

This commit is contained in:
Dylan K. Taylor
2017-07-13 12:04:47 +01:00
parent 5283975f20
commit 72d1948f30
4 changed files with 43 additions and 34 deletions

View File

@ -75,7 +75,7 @@ class ChunkRequestTask extends AsyncTask{
$batch = new BatchPacket();
$batch->addPacket($pk);
$batch->compress($this->compressionLevel);
$batch->setCompressionLevel($this->compressionLevel);
$batch->encode();
$this->setResult($batch->buffer, false);
@ -87,7 +87,6 @@ class ChunkRequestTask extends AsyncTask{
if($this->hasResult()){
$batch = new BatchPacket($this->getResult());
assert(strlen($batch->buffer) > 0);
$batch->compressed = true;
$batch->isEncoded = true;
$level->chunkRequestCallback($this->chunkX, $this->chunkZ, $batch);
}else{