Skip to content

API reference / @jsprismarine/protocol / LocatorBarWaypointPayload

Class: LocatorBarWaypointPayload ​

Defined in: protocol/src/structure/LocatorBarWaypointPayload.ts:27

A LocatorBarWaypointPayload: one entry of a LocatorBarPacket.

Protocol 2193 wire order: 0. GroupHandle: the waypoint's mce::UUID, which the client keys its waypoint groups on.

  1. ServerWaypointPayload: a ServerWaypointPayload.
  2. ActionFlag: a ServerWaypointGroupAction as one byte. The docs tag it Compression; for a value below 128 the varuint and the byte are the same. https://mojang.github.io/bedrock-protocol-docs/1.26.51/types/locator-bar-waypoint-payload/

Extends ​

Constructors ​

Constructor ​

new LocatorBarWaypointPayload(groupHandle?, payload?, action?): LocatorBarWaypointPayload

Defined in: protocol/src/structure/LocatorBarWaypointPayload.ts:35

Creates an entry from its fields. Every parameter has a default so the static deserialize can construct an empty instance before reading the stream.

Parameters ​

groupHandle? ​

UUID = ...

GroupHandle.

payload? ​

ServerWaypointPayload = ...

ServerWaypointPayload. For Remove, a payload with only its flag.

action? ​

ServerWaypointGroupAction = ServerWaypointGroupAction.None

ActionFlag.

Returns ​

LocatorBarWaypointPayload

Overrides ​

NetworkStructure.constructor

Properties ​

action ​

action: ServerWaypointGroupAction = ServerWaypointGroupAction.None

Defined in: protocol/src/structure/LocatorBarWaypointPayload.ts:38

ActionFlag.


groupHandle ​

groupHandle: UUID

Defined in: protocol/src/structure/LocatorBarWaypointPayload.ts:36

GroupHandle.


payload ​

payload: ServerWaypointPayload

Defined in: protocol/src/structure/LocatorBarWaypointPayload.ts:37

ServerWaypointPayload. For Remove, a payload with only its flag.

Methods ​

deserialize() ​

deserialize(stream): void

Defined in: protocol/src/structure/LocatorBarWaypointPayload.ts:51

Reads the handle, the payload, then the action byte.

Parameters ​

stream ​

NetworkBinaryStream

Returns ​

void

Overrides ​

NetworkStructure.deserialize


serialize() ​

serialize(stream): void

Defined in: protocol/src/structure/LocatorBarWaypointPayload.ts:44

Writes the handle, the payload, then the action byte.

Parameters ​

stream ​

NetworkBinaryStream

Returns ​

void

Overrides ​

NetworkStructure.serialize


deserialize() ​

static deserialize<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 ​

NetworkBinaryStream

The binary stream to deserialize from.

Returns ​

T

An instance of the class T.

Inherited from ​

NetworkStructure.deserialize