mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 09:26:06 +00:00
Added resource packs support
This commit is contained in:
@ -31,26 +31,26 @@ class ResourcePackDataInfoPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::RESOURCE_PACK_DATA_INFO_PACKET;
|
||||
|
||||
public $packId;
|
||||
public $int1;
|
||||
public $int2;
|
||||
public $packSize;
|
||||
public $unknown;
|
||||
public $maxChunkSize;
|
||||
public $chunkCount;
|
||||
public $compressedPackSize;
|
||||
public $sha256;
|
||||
|
||||
public function decode(){
|
||||
$this->packId = $this->getString();
|
||||
$this->int1 = $this->getLInt();
|
||||
$this->int2 = $this->getLInt();
|
||||
$this->packSize = $this->getLLong();
|
||||
$this->unknown = $this->getString();
|
||||
$this->maxChunkSize = $this->getLInt();
|
||||
$this->chunkCount = $this->getLInt();
|
||||
$this->compressedPackSize = $this->getLLong();
|
||||
$this->sha256 = $this->getString();
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
$this->reset();
|
||||
$this->putString($this->packId);
|
||||
$this->putLInt($this->int1);
|
||||
$this->putLInt($this->int2);
|
||||
$this->putLLong($this->packSize);
|
||||
$this->putString($this->unknown);
|
||||
$this->putLInt($this->maxChunkSize);
|
||||
$this->putLInt($this->chunkCount);
|
||||
$this->putLLong($this->compressedPackSize);
|
||||
$this->putString($this->sha256);
|
||||
}
|
||||
|
||||
public function handle(NetworkSession $session) : bool{
|
||||
|
Reference in New Issue
Block a user