13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
20 public const NETWORK_ID = ProtocolInfo::ACTOR_PICK_REQUEST_PACKET;
22 public int $actorUniqueId;
23 public int $hotbarSlot;
24 public bool $addUserData;
29 public static function create(
int $actorUniqueId,
int $hotbarSlot,
bool $addUserData) : self{
31 $result->actorUniqueId = $actorUniqueId;
32 $result->hotbarSlot = $hotbarSlot;
33 $result->addUserData = $addUserData;
38 $this->actorUniqueId = $in->getLLong();
39 $this->hotbarSlot = $in->
getByte();
40 $this->addUserData = $in->
getBool();
44 $out->putLLong($this->actorUniqueId);
45 $out->putByte($this->hotbarSlot);
46 $out->putBool($this->addUserData);
50 return $handler->handleActorPickRequest($this);
static create(int $actorUniqueId, int $hotbarSlot, bool $addUserData)
encodePayload(PacketSerializer $out)
decodePayload(PacketSerializer $in)
handle(PacketHandlerInterface $handler)