13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
21 public const NETWORK_ID = ProtocolInfo::ACTOR_EVENT_PACKET;
23 public int $actorRuntimeId;
26 public int $eventData = 0;
31 public static function create(
int $actorRuntimeId,
int $eventId,
int $eventData) : self{
33 $result->actorRuntimeId = $actorRuntimeId;
35 $result->eventData = $eventData;
40 $this->actorRuntimeId = $in->getActorRuntimeId();
41 $this->eventId = $in->
getByte();
46 $out->putActorRuntimeId($this->actorRuntimeId);
47 $out->putByte($this->eventId);
52 return $handler->handleActorEvent($this);
handle(PacketHandlerInterface $handler)
static create(int $actorRuntimeId, int $eventId, int $eventData)
encodePayload(PacketSerializer $out)
decodePayload(PacketSerializer $in)