use pocketmine\network\mcpe\NetworkSession; class LabTablePacket extends DataPacket{ public const NETWORK_ID = ProtocolInfo::LAB_TABLE_PACKET; public const TYPE_START_COMBINE = 0; public const TYPE_START_REACTION = 1; public const TYPE_RESET = 2; /** @var int */ public $type; /** @var int */ public $x; /** @var int */ public $y; /** @var int */ public $z; /** @var int */ public $reactionType; protected function decodePayload(){ $this->type = $this->getByte(); $this->getSignedBlockPosition($this->x, $this->y, $this->z); $this->reactionType = $this->getByte(); } protected function encodePayload(){ $this->putByte($this->type); $this->putSignedBlockPosition($this->x, $this->y, $this->z); $this->putByte($this->reactionType); } public function handle(NetworkSession $session) : bool{ return $session->handleLabTable($this); } }