API reference / @jsprismarine/protocol / SyncedPlayerMovementSettings
Class: SyncedPlayerMovementSettings
Defined in: protocol/src/structure/SyncedPlayerMovementSettings.ts:16
The movement settings a server syncs to a joining client (StartGamePacket field 10).
Protocol 2193 wire order: 0. Rewind History Size: varint32, how many ticks of input the client keeps for corrections.
- Server Authoritative Block Breaking: boolean.
Nothing comes before the rewind size. The movement mode byte that used to lead this structure left the wire with 1.21.90, and a server that still writes it puts every later field of the StartGame packet one byte off. https://mojang.github.io/bedrock-protocol-docs/1.26.50/types/synced-player-movement-settings/
Extends
Constructors
Constructor
new SyncedPlayerMovementSettings(
rewindHistorySize,serverAuthoritativeBlockBreaking):SyncedPlayerMovementSettings
Defined in: protocol/src/structure/SyncedPlayerMovementSettings.ts:17
Parameters
rewindHistorySize
number
serverAuthoritativeBlockBreaking
boolean
Returns
SyncedPlayerMovementSettings
Overrides
Properties
rewindHistorySize
rewindHistorySize:
number
Defined in: protocol/src/structure/SyncedPlayerMovementSettings.ts:18
serverAuthoritativeBlockBreaking
serverAuthoritativeBlockBreaking:
boolean
Defined in: protocol/src/structure/SyncedPlayerMovementSettings.ts:19
Methods
deserialize()
deserialize(
stream):void
Defined in: protocol/src/structure/SyncedPlayerMovementSettings.ts:29
Deserializes the network structure from a binary stream.
Parameters
stream
The binary stream to deserialize from.
Returns
void
Overrides
serialize()
serialize(
stream):void
Defined in: protocol/src/structure/SyncedPlayerMovementSettings.ts:24
Serializes the network structure to a binary stream.
Parameters
stream
The binary stream to serialize to.
Returns
void
Overrides
deserialize()
staticdeserialize<T>(this,stream):T
Defined in: protocol/src/NetworkStructure.ts:28
Deserializes the network structure from a binary stream. The constructor runs with no arguments before the stream is read, so the class must tolerate that.
Type Parameters
T
T extends NetworkStructure
Parameters
this
Constructor<T>
stream
The binary stream to deserialize from.
Returns
T
An instance of the class T.