mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Updated existing packets and added new ones
This commit is contained in:
@ -31,20 +31,23 @@ class MobEquipmentPacket extends DataPacket{
|
||||
public $item;
|
||||
public $slot;
|
||||
public $selectedSlot;
|
||||
public $unknownByte;
|
||||
|
||||
public function decode(){
|
||||
$this->eid = $this->getLong();
|
||||
$this->eid = $this->getEntityId(); //EntityRuntimeID
|
||||
$this->item = $this->getSlot();
|
||||
$this->slot = $this->getByte();
|
||||
$this->selectedSlot = $this->getByte();
|
||||
$this->unknownByte = $this->getByte();
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
$this->reset();
|
||||
$this->putLong($this->eid);
|
||||
$this->putEntityId($this->eid); //EntityRuntimeID
|
||||
$this->putSlot($this->item);
|
||||
$this->putByte($this->slot);
|
||||
$this->putByte($this->selectedSlot);
|
||||
$this->putByte($this->unknownByte);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user