mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
1.11.0 protocol changes
This commit is contained in:
@ -33,6 +33,8 @@ class LecternUpdatePacket extends DataPacket/* implements ServerboundPacket*/{
|
||||
/** @var int */
|
||||
public $page;
|
||||
/** @var int */
|
||||
public $totalPages;
|
||||
/** @var int */
|
||||
public $x;
|
||||
/** @var int */
|
||||
public $y;
|
||||
@ -43,12 +45,14 @@ class LecternUpdatePacket extends DataPacket/* implements ServerboundPacket*/{
|
||||
|
||||
protected function decodePayload() : void{
|
||||
$this->page = $this->getByte();
|
||||
$this->totalPages = $this->getByte();
|
||||
$this->getBlockPosition($this->x, $this->y, $this->z);
|
||||
$this->dropBook = $this->getBool();
|
||||
}
|
||||
|
||||
protected function encodePayload() : void{
|
||||
$this->putByte($this->page);
|
||||
$this->putByte($this->totalPages);
|
||||
$this->putBlockPosition($this->x, $this->y, $this->z);
|
||||
$this->putBool($this->dropBook);
|
||||
}
|
||||
|
Reference in New Issue
Block a user