use pocketmine\network\mcpe\protocol\types\entity\EntityLink; use pocketmine\network\mcpe\serializer\NetworkBinaryStream; class SetActorLinkPacket extends DataPacket implements ClientboundPacket{ public const NETWORK_ID = ProtocolInfo::SET_ACTOR_LINK_PACKET; /** @var EntityLink */ public $link; protected function decodePayload(NetworkBinaryStream $in) : void{ $this->link = $in->getEntityLink(); } protected function encodePayload(NetworkBinaryStream $out) : void{ $out->putEntityLink($this->link); } public function handle(PacketHandlerInterface $handler) : bool{ return $handler->handleSetActorLink($this); } }