mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Added PhpDoc for packet field types and changed float x,y,z to Vector3
This commit is contained in:
@ -32,24 +32,23 @@ use pocketmine\network\mcpe\NetworkSession;
|
||||
class MobArmorEquipmentPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::MOB_ARMOR_EQUIPMENT_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $entityRuntimeId;
|
||||
/** @var Item[] */
|
||||
public $slots = [];
|
||||
|
||||
protected function decodePayload(){
|
||||
$this->entityRuntimeId = $this->getEntityRuntimeId();
|
||||
$this->slots[0] = $this->getSlot();
|
||||
$this->slots[1] = $this->getSlot();
|
||||
$this->slots[2] = $this->getSlot();
|
||||
$this->slots[3] = $this->getSlot();
|
||||
for($i = 0; $i < 4; ++$i){
|
||||
$this->slots[$i] = $this->getSlot();
|
||||
}
|
||||
}
|
||||
|
||||
protected function encodePayload(){
|
||||
$this->putEntityRuntimeId($this->entityRuntimeId);
|
||||
$this->putSlot($this->slots[0]);
|
||||
$this->putSlot($this->slots[1]);
|
||||
$this->putSlot($this->slots[2]);
|
||||
$this->putSlot($this->slots[3]);
|
||||
for($i = 0; $i < 4; ++$i){
|
||||
$this->putSlot($this->slots[$i]);
|
||||
}
|
||||
}
|
||||
|
||||
public function handle(NetworkSession $session) : bool{
|
||||
|
Reference in New Issue
Block a user