Protocol changes for 1.12.0.28

This commit is contained in:
Dylan K. Taylor
2019-07-12 18:33:02 +01:00
parent 59c310b914
commit c58a1bf9b7
52 changed files with 1477 additions and 562 deletions

View File

@ -42,6 +42,10 @@ class ResourcePackDataInfoPacket extends DataPacket{
public $compressedPackSize;
/** @var string */
public $sha256;
/** @var bool */
public $isPremium = false;
/** @var int */
public $packType = 0; //TODO: check the values for this
protected function decodePayload(){
$this->packId = $this->getString();
@ -49,6 +53,8 @@ class ResourcePackDataInfoPacket extends DataPacket{
$this->chunkCount = $this->getLInt();
$this->compressedPackSize = $this->getLLong();
$this->sha256 = $this->getString();
$this->isPremium = $this->getBool();
$this->packType = $this->getByte();
}
protected function encodePayload(){
@ -57,6 +63,8 @@ class ResourcePackDataInfoPacket extends DataPacket{
$this->putLInt($this->chunkCount);
$this->putLLong($this->compressedPackSize);
$this->putString($this->sha256);
$this->putBool($this->isPremium);
$this->putByte($this->packType);
}
public function handle(NetworkSession $session) : bool{