mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-09 19:24:12 +00:00
PacketStream: added fromPackets() sugar
This commit is contained in:
@ -57,10 +57,7 @@ class ChunkRequestTask extends AsyncTask{
|
||||
$pk->chunkZ = $this->chunkZ;
|
||||
$pk->data = $this->chunk;
|
||||
|
||||
$stream = new PacketStream();
|
||||
$stream->putPacket($pk);
|
||||
|
||||
$this->setResult(NetworkCompression::compress($stream->getBuffer(), $this->compressionLevel));
|
||||
$this->setResult(NetworkCompression::compress(PacketStream::fromPackets($pk)->getBuffer(), $this->compressionLevel));
|
||||
}
|
||||
|
||||
public function onError() : void{
|
||||
|
Reference in New Issue
Block a user