13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
22 public const NETWORK_ID = ProtocolInfo::SET_ACTOR_DATA_PACKET;
24 public int $actorRuntimeId;
29 public array $metadata;
38 public static function create(
int $actorRuntimeId, array $metadata,
PropertySyncData $syncedProperties,
int $tick) : self{
40 $result->actorRuntimeId = $actorRuntimeId;
41 $result->metadata = $metadata;
42 $result->syncedProperties = $syncedProperties;
43 $result->tick = $tick;
48 $this->actorRuntimeId = $in->getActorRuntimeId();
50 $this->syncedProperties = PropertySyncData::read($in);
55 $out->putActorRuntimeId($this->actorRuntimeId);
57 $this->syncedProperties->write($out);
62 return $handler->handleSetActorData($this);
decodePayload(PacketSerializer $in)
handle(PacketHandlerInterface $handler)
static create(int $actorRuntimeId, array $metadata, PropertySyncData $syncedProperties, int $tick)
encodePayload(PacketSerializer $out)
putEntityMetadata(array $metadata)
putUnsignedVarLong(int $v)