More broken mess to spawn 1.2

This commit is contained in:
Dylan K. Taylor
2017-08-01 20:06:02 +01:00
parent 10ff2948ac
commit 77cd8e7799
52 changed files with 1558 additions and 506 deletions

View File

@ -0,0 +1,73 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
declare(strict_types=1);
namespace pocketmine\network\mcpe\protocol;
#include <rules/DataPacket.h>
use pocketmine\network\mcpe\NetworkSession;
use pocketmine\utils\UUID;
class PlayerSkinPacket extends DataPacket{
const NETWORK_ID = ProtocolInfo::PLAYER_SKIN_PACKET;
/** @var UUID */
public $uuid;
/** @var string */
public $skinId;
/** @var string */
public $skinName;
/** @var string */
public $serializeName;
/** @var string */
public $skinData;
/** @var string */
public $geometryModel;
/** @var string */
public $geometryData;
public function decodePayload(){
$this->uuid = $this->getUUID();
$this->skinId = $this->getString();
$this->skinName = $this->getString();
$this->serializeName = $this->getString();
$this->skinData = $this->getString();
$this->geometryModel = $this->getString();
$this->geometryData = $this->getString();
}
public function encodePayload(){
$this->putUUID($this->uuid);
$this->putString($this->skinId);
$this->putString($this->skinName);
$this->putString($this->serializeName);
$this->putString($this->skinData);
$this->putString($this->geometryModel);
$this->putString($this->geometryData);
}
public function handle(NetworkSession $session) : bool{
return $session->handlePlayerSkin($this);
}
}