Protocol changes for 1.6.0.8 + resource packs "fix"

This commit is contained in:
Dylan K. Taylor
2018-07-27 16:42:11 +01:00
parent 424c50e1e9
commit 9ca38ba868
4 changed files with 17 additions and 4 deletions

View File

@@ -75,6 +75,9 @@ class AddPlayerPacket extends DataPacket{
/** @var EntityLink[] */
public $links = [];
/** @var string */
public $deviceId = ""; //TODO: fill player's device ID (???)
protected function decodePayload(){
$this->uuid = $this->getUUID();
$this->username = $this->getString();
@@ -103,6 +106,8 @@ class AddPlayerPacket extends DataPacket{
for($i = 0; $i < $linkCount; ++$i){
$this->links[$i] = $this->getEntityLink();
}
$this->deviceId = $this->getString();
}
protected function encodePayload(){
@@ -133,6 +138,8 @@ class AddPlayerPacket extends DataPacket{
foreach($this->links as $link){
$this->putEntityLink($link);
}
$this->putString($this->deviceId);
}
public function handle(NetworkSession $session) : bool{