mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
New field for MobEquipmentPacket
If anyone wants to play with the off-hand, the window ID is 0x77 ;)
This commit is contained in:
@ -33,14 +33,14 @@ class MobEquipmentPacket extends DataPacket{
|
||||
public $item;
|
||||
public $inventorySlot;
|
||||
public $hotbarSlot;
|
||||
public $unknownByte = 0;
|
||||
public $windowId = 0;
|
||||
|
||||
public function decode(){
|
||||
$this->entityRuntimeId = $this->getEntityRuntimeId();
|
||||
$this->item = $this->getSlot();
|
||||
$this->inventorySlot = $this->getByte();
|
||||
$this->hotbarSlot = $this->getByte();
|
||||
$this->unknownByte = $this->getByte();
|
||||
$this->windowId = $this->getByte();
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
@ -49,7 +49,7 @@ class MobEquipmentPacket extends DataPacket{
|
||||
$this->putSlot($this->item);
|
||||
$this->putByte($this->inventorySlot);
|
||||
$this->putByte($this->hotbarSlot);
|
||||
$this->putByte($this->unknownByte);
|
||||
$this->putByte($this->windowId);
|
||||
}
|
||||
|
||||
public function handle(NetworkSession $session) : bool{
|
||||
|
Reference in New Issue
Block a user