Skip to content

API reference / @jsprismarine/protocol / SyncedProperties

Class: SyncedProperties ​

Defined in: protocol/src/bedrock/wire/structures/SyncedProperties.ts:22

The 2193 PropertySyncData structure carried by SetActorDataPacket, AddActorPacket and AddPlayerPacket.

On the wire it is two lists. The Int Entries List is a varuint32 count followed by one Property Index varuint32 and Data ZigZag varint32 per entry. The Float Entries List is a varuint32 count followed by one Property Index varuint32 and Data little-endian float per entry. Property indexes follow the client-synced definitions sent for the actor type.

Constructors ​

Constructor ​

new SyncedProperties(): SyncedProperties

Returns ​

SyncedProperties

Properties ​

floatProps ​

floatProps: PropertySyncEntry[] = []

Defined in: protocol/src/bedrock/wire/structures/SyncedProperties.ts:26

Float Entries List, in the order they are written.


intProps ​

intProps: PropertySyncEntry[] = []

Defined in: protocol/src/bedrock/wire/structures/SyncedProperties.ts:24

Int Entries List, in the order they are written.

Methods ​

networkSerialize() ​

networkSerialize(stream): void

Defined in: protocol/src/bedrock/wire/structures/SyncedProperties.ts:31

Write both lists in docs order: int entries, then float entries.

Parameters ​

stream ​

BinaryStream

Returns ​

void


networkDeserialize() ​

static networkDeserialize(stream): SyncedProperties

Defined in: protocol/src/bedrock/wire/structures/SyncedProperties.ts:46

Reads both lists in docs order, the mirror of networkSerialize.

Parameters ​

stream ​

BinaryStream

Returns ​

SyncedProperties