[API reference](https://jsprismarine.dev/api/index.md) / [@jsprismarine/protocol](https://jsprismarine.dev/api/@jsprismarine/protocol/index.md) / ServerboundRequestOnlineMusicPlaybackPacket

# Class: ServerboundRequestOnlineMusicPlaybackPacket

Defined in: [protocol/src/bedrock/packet/ServerboundRequestOnlineMusicPlaybackPacket.ts:14](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/protocol/src/bedrock/packet/ServerboundRequestOnlineMusicPlaybackPacket.ts#L14)

The client asks to stream a music disc's track.

Added at protocol 2259 (Minecraft Preview 1.26.70.24); the layout is read off Mojang's
v1.26.70-preview.24 schemas. A codec older than 2259 has no id for it.

## See

`docs/research/protocol-2259-delta.md`

## Extends

- [`AvailableCommandsPacket`](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/AvailableCommandsPacket.md#constructoravailablecommandspacket)

## Constructors

### Constructor

> **new ServerboundRequestOnlineMusicPlaybackPacket**(`buffer?`): `ServerboundRequestOnlineMusicPlaybackPacket`

Defined in: [protocol/src/FieldNetworkPacket.ts:16](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/protocol/src/FieldNetworkPacket.ts#L16)

A field-based packet has no separate payload object.

#### Parameters

##### buffer?

`Buffer`\<`ArrayBufferLike`\>

#### Returns

`ServerboundRequestOnlineMusicPlaybackPacket`

#### Inherited from

`FieldNetworkPacket.constructor`

## Properties

### codecProtocol

> **codecProtocol**: `number` = `protocolVersion`

Defined in: [protocol/src/NetworkPacket.ts:54](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/protocol/src/NetworkPacket.ts#L54)

Version stamped by the connection codec for version-gated payloads.

#### Inherited from

`FieldNetworkPacket.codecProtocol`

***

### requestId

> **requestId**: `number` = `0`

Defined in: [protocol/src/bedrock/packet/ServerboundRequestOnlineMusicPlaybackPacket.ts:21](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/protocol/src/bedrock/packet/ServerboundRequestOnlineMusicPlaybackPacket.ts#L21)

`Request ID`, echoed by the response.

***

### senderSubClientId

> **senderSubClientId**: `number` = `0`

Defined in: [protocol/src/NetworkPacket.ts:51](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/protocol/src/NetworkPacket.ts#L51)

#### Inherited from

`FieldNetworkPacket.senderSubClientId`

***

### soundEventName

> **soundEventName**: `string` = `''`

Defined in: [protocol/src/bedrock/packet/ServerboundRequestOnlineMusicPlaybackPacket.ts:24](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/protocol/src/bedrock/packet/ServerboundRequestOnlineMusicPlaybackPacket.ts#L24)

`Sound Event Name`: the disc's sound event.

***

### targetSubClientId

> **targetSubClientId**: `number` = `0`

Defined in: [protocol/src/NetworkPacket.ts:52](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/protocol/src/NetworkPacket.ts#L52)

#### Inherited from

`FieldNetworkPacket.targetSubClientId`

## Methods

### clear()

> **clear**(): `void`

Defined in: [binaryutils/src/BinaryStream.ts:982](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L982)

Clears the whole BinaryStream instance.

The write buffer and its capacity are kept, so any view previously returned by
[getWriteBuffer](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/NetworkBinaryStream.md#getwritebuffer) is invalidated. See [resetWrite](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/NetworkBinaryStream.md#resetwrite).

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.clear`

***

### copyInto()

> **copyInto**(`target`, `offset?`): `number`

Defined in: [binaryutils/src/BinaryStream.ts:861](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L861)

Copies the encoded bytes into a caller-owned buffer at `offset` and returns the offset
just past them. Lets many packets be encoded into one arena with no per-packet
allocation at all.

#### Parameters

##### target

`Buffer`

##### offset?

`number` = `0`

#### Returns

`number`

the new offset

#### Inherited from

`FieldNetworkPacket.copyInto`

***

### copyOut()

> **copyOut**(): `Buffer`

Defined in: [binaryutils/src/BinaryStream.ts:845](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L845)

Returns the encoded bytes as an exactly-sized, standalone Buffer.

Unlike [getWriteBuffer](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/NetworkBinaryStream.md#getwritebuffer) the result does not alias this stream, so it survives
[resetWrite](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/NetworkBinaryStream.md#resetwrite), and it does not pin a pool chunk: because `Buffer.allocUnsafe` is
pool-backed (`Buffer.poolSize` is 64 KB on current Node), holding on to a handful of
small slices from [getWriteBuffer](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/NetworkBinaryStream.md#getwritebuffer) can keep megabytes alive.

#### Returns

`Buffer`

#### Inherited from

`FieldNetworkPacket.copyOut`

***

### decode()

> **decode**(`context?`): `void`

Defined in: [protocol/src/FieldNetworkPacket.ts:56](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/protocol/src/FieldNetworkPacket.ts#L56)

Decodes a legacy field body and leaves the original packet bytes available via `getBuffer`.

#### Parameters

##### context?

[`ProtocolContext`](https://jsprismarine.dev/api/@jsprismarine/protocol/index.md#protocolcontext)

Versioned registries and captured data for this connection.

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.decode`

***

### decodeHeader()

> **decodeHeader**(): `void`

Defined in: [protocol/src/NetworkPacket.ts:142](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/protocol/src/NetworkPacket.ts#L142)

Reads and validates the Bedrock packet header from this instance's read buffer.

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.decodeHeader`

***

### decodePayload()

> **decodePayload**(): `void`

Defined in: [protocol/src/bedrock/packet/ServerboundRequestOnlineMusicPlaybackPacket.ts:32](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/protocol/src/bedrock/packet/ServerboundRequestOnlineMusicPlaybackPacket.ts#L32)

Reads them back in the same order.

#### Returns

`void`

#### Overrides

`FieldNetworkPacket.decodePayload`

***

### deserialize()

> **deserialize**(`stream`, `context?`): `unknown`

Defined in: [protocol/src/NetworkPacket.ts:194](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/protocol/src/NetworkPacket.ts#L194)

Deserializes the network packet from a binary stream.

#### Parameters

##### stream

[`NetworkBinaryStream`](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/NetworkBinaryStream.md)

The stream containing the packet header and body.

##### context?

[`ProtocolContext`](https://jsprismarine.dev/api/@jsprismarine/protocol/index.md#protocolcontext)

Optional protocol data supplied for the connection.

#### Returns

`unknown`

The typed packet body.

#### Inherited from

`FieldNetworkPacket.deserialize`

***

### encode()

> **encode**(`context?`): `void`

Defined in: [protocol/src/FieldNetworkPacket.ts:38](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/protocol/src/FieldNetworkPacket.ts#L38)

Encodes the legacy field body using this connection's version and supplied protocol data.

#### Parameters

##### context?

[`ProtocolContext`](https://jsprismarine.dev/api/@jsprismarine/protocol/index.md#protocolcontext)

Versioned registries and captured data for this connection.

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.encode`

***

### encodeHeader()

> **encodeHeader**(): `void`

Defined in: [protocol/src/NetworkPacket.ts:137](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/protocol/src/NetworkPacket.ts#L137)

Writes the Bedrock packet header to this instance's write buffer.

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.encodeHeader`

***

### encodePayload()

> **encodePayload**(): `void`

Defined in: [protocol/src/bedrock/packet/ServerboundRequestOnlineMusicPlaybackPacket.ts:27](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/protocol/src/bedrock/packet/ServerboundRequestOnlineMusicPlaybackPacket.ts#L27)

Writes the fields in layout order.

#### Returns

`void`

#### Overrides

`FieldNetworkPacket.encodePayload`

***

### encodeTransient()

> **encodeTransient**(`context?`): `Buffer`

Defined in: [protocol/src/FieldNetworkPacket.ts:47](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/protocol/src/FieldNetworkPacket.ts#L47)

#### Parameters

##### context?

[`ProtocolContext`](https://jsprismarine.dev/api/@jsprismarine/protocol/index.md#protocolcontext)

#### Returns

`Buffer`

#### Inherit Doc

#### Inherited from

`FieldNetworkPacket.encodeTransient`

***

### feof()

> **feof**(): `boolean`

Defined in: [binaryutils/src/BinaryStream.ts:880](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L880)

Returns whatever or not the read offset is at end of line.

#### Returns

`boolean`

#### Inherited from

`FieldNetworkPacket.feof`

***

### ~~getBuffer()~~

> **getBuffer**(): `Buffer`

Defined in: [binaryutils/src/BinaryStream.ts:917](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L917)

Returns the encoded buffer.

Beware: when a read buffer is present this returns *that*, discarding everything
written. On a stream used for both reading and writing it never returns your output.

#### Returns

`Buffer`

#### Deprecated

See [getReadBuffer](#getreadbuffer) and [getWriteBuffer](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/NetworkBinaryStream.md#getwritebuffer).

#### Inherited from

`FieldNetworkPacket.getBuffer`

***

### getEncoded()

> **getEncoded**(): `boolean`

Defined in: [protocol/src/NetworkPacket.ts:94](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/protocol/src/NetworkPacket.ts#L94)

#### Returns

`boolean`

Whether this packet already has encoded bytes in its stream.

#### Inherited from

`FieldNetworkPacket.getEncoded`

***

### getId()

> **getId**(): `number`

Defined in: [protocol/src/NetworkPacket.ts:81](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/protocol/src/NetworkPacket.ts#L81)

Gets the wire id stamped by a version codec, or the packet class's default id.

#### Returns

`number`

The packet id for this instance.

#### Inherited from

`FieldNetworkPacket.getId`

***

### getName()

> **getName**(): `string`

Defined in: [protocol/src/bedrock/packet/ServerboundRequestOnlineMusicPlaybackPacket.ts:16](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/protocol/src/bedrock/packet/ServerboundRequestOnlineMusicPlaybackPacket.ts#L16)

The name this packet's wire id is listed under.

#### Returns

`string`

#### Overrides

`FieldNetworkPacket.getName`

***

### getPacketData()

> **getPacketData**(): `unknown`

Defined in: [protocol/src/NetworkPacket.ts:209](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/protocol/src/NetworkPacket.ts#L209)

Returns the packet body object supplied to the constructor or produced by `deserialize`.

#### Returns

`unknown`

The typed payload, or `null` before one has been supplied or decoded.

#### Inherited from

`FieldNetworkPacket.getPacketData`

***

### getReadBuffer()

> **getReadBuffer**(): `Buffer`\<`ArrayBufferLike`\> \| `null`

Defined in: [binaryutils/src/BinaryStream.ts:925](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L925)

Returns the read buffer if available.

#### Returns

`Buffer`\<`ArrayBufferLike`\> \| `null`

#### Inherited from

`FieldNetworkPacket.getReadBuffer`

***

### getReadIndex()

> **getReadIndex**(): `number`

Defined in: [binaryutils/src/BinaryStream.ts:1024](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L1024)

Retuns the read index.

#### Returns

`number`

#### Inherited from

`FieldNetworkPacket.getReadIndex`

***

### getWriteBuffer()

> **getWriteBuffer**(): `Buffer`

Defined in: [binaryutils/src/BinaryStream.ts:941](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L941)

Returns the encoded bytes as a *view* over this stream's internal buffer.

The view is only valid until the next write: [resetWrite](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/NetworkBinaryStream.md#resetwrite), [clear](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/NetworkBinaryStream.md#clear) and
[reuse](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/NetworkBinaryStream.md#reuse) all rewind the cursor without reallocating, so a previously returned
buffer is silently overwritten by the next packet. If you queue the result - a send
queue, a resend window - use [copyOut](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/NetworkBinaryStream.md#copyout) or [copyInto](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/NetworkBinaryStream.md#copyinto) instead.

It also keeps the whole pooled 64 KB chunk it was carved from alive; retaining a
scattered handful of small packets this way can pin megabytes.

#### Returns

`Buffer`

#### Inherited from

`FieldNetworkPacket.getWriteBuffer`

***

### getWriteIndex()

> **getWriteIndex**(): `number`

Defined in: [binaryutils/src/BinaryStream.ts:1032](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L1032)

Returns the write index.

#### Returns

`number`

#### Inherited from

`FieldNetworkPacket.getWriteIndex`

***

### read()

> **read**(`len`): `Buffer`

Defined in: [binaryutils/src/BinaryStream.ts:63](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L63)

Reads a slice of buffer by the given length.

#### Parameters

##### len

`number`

How many bytes to read: a nonnegative integer.

#### Returns

`Buffer`

#### Throws

AssertionError when `len` is negative or not an integer, or runs past the end.

#### Inherited from

`FieldNetworkPacket.read`

***

### readBoolean()

> **readBoolean**(): `boolean`

Defined in: [binaryutils/src/BinaryStream.ts:180](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L180)

Reads a boolean (true or false).

#### Returns

`boolean`

#### Inherited from

`FieldNetworkPacket.readBoolean`

***

### readByte()

> **readByte**(): `number`

Defined in: [binaryutils/src/BinaryStream.ts:144](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L144)

Reads an unsigned byte (0 to 255).

#### Returns

`number`

#### Inherited from

`FieldNetworkPacket.readByte`

***

### readDouble()

> **readDouble**(): `number`

Defined in: [binaryutils/src/BinaryStream.ts:486](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L486)

Returns a 64 bit (8 bytes) big-endian flating point number.

#### Returns

`number`

#### Inherited from

`FieldNetworkPacket.readDouble`

***

### readDoubleLE()

> **readDoubleLE**(): `number`

Defined in: [binaryutils/src/BinaryStream.ts:506](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L506)

Returns a 64 bit (8 bytes) little-endian flating point number.

#### Returns

`number`

#### Inherited from

`FieldNetworkPacket.readDoubleLE`

***

### readFloat()

> **readFloat**(): `number`

Defined in: [binaryutils/src/BinaryStream.ts:442](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L442)

Returns a 32 bit (4 bytes) big-endian flating point number.

#### Returns

`number`

#### Inherited from

`FieldNetworkPacket.readFloat`

***

### readFloatLE()

> **readFloatLE**(): `number`

Defined in: [binaryutils/src/BinaryStream.ts:464](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L464)

Returns a 32 bit (4 bytes) big-endian flating point number.

#### Returns

`number`

#### Inherited from

`FieldNetworkPacket.readFloatLE`

***

### readInt()

> **readInt**(): `number`

Defined in: [binaryutils/src/BinaryStream.ts:362](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L362)

Reads a 32 bit (4 bytes) big-endian signed number.

#### Returns

`number`

#### Inherited from

`FieldNetworkPacket.readInt`

***

### readIntLE()

> **readIntLE**(): `number`

Defined in: [binaryutils/src/BinaryStream.ts:382](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L382)

Reads a 32 bit (4 bytes) signed number.

#### Returns

`number`

#### Inherited from

`FieldNetworkPacket.readIntLE`

***

### readLengthPrefixed()

> **readLengthPrefixed**(): `Buffer`

Defined in: [binaryutils/src/BinaryStream.ts:108](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L108)

Reads a varuint32 byte length, then that many bytes.

#### Returns

`Buffer`

The bytes, a view into the stream's buffer.

#### Inherited from

`FieldNetworkPacket.readLengthPrefixed`

***

### readLong()

> **readLong**(): `bigint`

Defined in: [binaryutils/src/BinaryStream.ts:526](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L526)

Returns a 64 bit (8 bytes) signed big-endian number.

#### Returns

`bigint`

#### Inherited from

`FieldNetworkPacket.readLong`

***

### readLongLE()

> **readLongLE**(): `bigint`

Defined in: [binaryutils/src/BinaryStream.ts:545](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L545)

Returns a 64 bit (8 bytes) signed little-endian number.

#### Returns

`bigint`

#### Inherited from

`FieldNetworkPacket.readLongLE`

***

### readRemaining()

> **readRemaining**(): `Buffer`

Defined in: [binaryutils/src/BinaryStream.ts:893](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L893)

Reads the remaining bytes and returns the buffer slice.

#### Returns

`Buffer`

#### Inherited from

`FieldNetworkPacket.readRemaining`

***

### readShort()

> **readShort**(): `number`

Defined in: [binaryutils/src/BinaryStream.ts:198](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L198)

Reads a 16 bit (2 bytes) signed big-endian number.

#### Returns

`number`

#### Inherited from

`FieldNetworkPacket.readShort`

***

### readShortLE()

> **readShortLE**(): `number`

Defined in: [binaryutils/src/BinaryStream.ts:218](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L218)

Reads a 16 bit (2 bytes) signed little-endian number.

#### Returns

`number`

#### Inherited from

`FieldNetworkPacket.readShortLE`

***

### readSignedByte()

> **readSignedByte**(): `number`

Defined in: [binaryutils/src/BinaryStream.ts:162](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L162)

Reads a signed byte (-128 to 127).

#### Returns

`number`

#### Inherited from

`FieldNetworkPacket.readSignedByte`

***

### readTriad()

> **readTriad**(): `number`

Defined in: [binaryutils/src/BinaryStream.ts:278](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L278)

Reads a 24 bit (3 bytes) signed big-endian number.

#### Returns

`number`

#### Inherited from

`FieldNetworkPacket.readTriad`

***

### readTriadLE()

> **readTriadLE**(): `number`

Defined in: [binaryutils/src/BinaryStream.ts:299](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L299)

Reads a 24 bit (3 bytes) little-endian number.

#### Returns

`number`

#### Inherited from

`FieldNetworkPacket.readTriadLE`

***

### readUnsignedInt()

> **readUnsignedInt**(): `number`

Defined in: [binaryutils/src/BinaryStream.ts:402](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L402)

Reads a 32 bit (4 bytes) big-endian unsigned number.

#### Returns

`number`

#### Inherited from

`FieldNetworkPacket.readUnsignedInt`

***

### readUnsignedIntLE()

> **readUnsignedIntLE**(): `number`

Defined in: [binaryutils/src/BinaryStream.ts:422](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L422)

Reads a 32 bit (4 bytes) little-endian unsigned number.

#### Returns

`number`

#### Inherited from

`FieldNetworkPacket.readUnsignedIntLE`

***

### readUnsignedLong()

> **readUnsignedLong**(): `bigint`

Defined in: [binaryutils/src/BinaryStream.ts:564](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L564)

Returns a 64 bit (8 bytes) unsigned big-endian number.

#### Returns

`bigint`

#### Inherited from

`FieldNetworkPacket.readUnsignedLong`

***

### readUnsignedLongLE()

> **readUnsignedLongLE**(): `bigint`

Defined in: [binaryutils/src/BinaryStream.ts:583](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L583)

Returns a 64 bit (8 bytes) unsigned little-endian number.

#### Returns

`bigint`

#### Inherited from

`FieldNetworkPacket.readUnsignedLongLE`

***

### readUnsignedShort()

> **readUnsignedShort**(): `number`

Defined in: [binaryutils/src/BinaryStream.ts:238](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L238)

Reads a 16 bit (2 bytes) unsigned big-endian number.

#### Returns

`number`

#### Inherited from

`FieldNetworkPacket.readUnsignedShort`

***

### readUnsignedShortLE()

> **readUnsignedShortLE**(): `number`

Defined in: [binaryutils/src/BinaryStream.ts:258](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L258)

Reads a 16 bit (2 bytes) unsigned little-endian number.

#### Returns

`number`

#### Inherited from

`FieldNetworkPacket.readUnsignedShortLE`

***

### readUnsignedTriad()

> **readUnsignedTriad**(): `number`

Defined in: [binaryutils/src/BinaryStream.ts:320](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L320)

Reads a 24 bit (3 bytes) unsigned big-endian number.

#### Returns

`number`

#### Inherited from

`FieldNetworkPacket.readUnsignedTriad`

***

### readUnsignedTriadLE()

> **readUnsignedTriadLE**(): `number`

Defined in: [binaryutils/src/BinaryStream.ts:341](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L341)

Reads a 24 bit (3 bytes) unsigned little-endian number.

#### Returns

`number`

#### Inherited from

`FieldNetworkPacket.readUnsignedTriadLE`

***

### readUnsignedVarInt()

> **readUnsignedVarInt**(): `number`

Defined in: [binaryutils/src/BinaryStream.ts:624](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L624)

Reads a 32 bit unsigned number.

#### Returns

`number`

#### Inherited from

`FieldNetworkPacket.readUnsignedVarInt`

***

### readUnsignedVarLong()

> **readUnsignedVarLong**(): `bigint`

Defined in: [binaryutils/src/BinaryStream.ts:707](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L707)

Reads a 64 bit unsigned variable-length number.

#### Returns

`bigint`

#### Inherited from

`FieldNetworkPacket.readUnsignedVarLong`

***

### readVarInt()

> **readVarInt**(): `number`

Defined in: [binaryutils/src/BinaryStream.ts:602](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L602)

Reads a 32 bit (4 bytes) zigzag-encoded number.

#### Returns

`number`

#### Inherited from

`FieldNetworkPacket.readVarInt`

***

### readVarLong()

> **readVarLong**(): `bigint`

Defined in: [binaryutils/src/BinaryStream.ts:680](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L680)

Reads a 64 bit zigzag-encoded variable-length number.

#### Returns

`bigint`

#### Inherited from

`FieldNetworkPacket.readVarLong`

***

### readVarString()

> **readVarString**(): `string`

Defined in: [binaryutils/src/BinaryStream.ts:127](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L127)

Reads a string: a varuint32 byte length, then UTF-8 bytes, the form Bedrock writes strings in.
Named apart from `readString` because RakNet's packets read theirs with a u16 length.
[The docs' string primitive](https://mojang.github.io/bedrock-protocol-docs/1.26.51/primitives/#string)

#### Returns

`string`

The read string.

#### Inherited from

`FieldNetworkPacket.readVarString`

***

### reserve()

> **reserve**(`capacity`): `this`

Defined in: [binaryutils/src/BinaryStream.ts:810](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L810)

Grows the write buffer so that at least `capacity` bytes can be written without any
further allocation, and returns this stream.

Pre-sizing skips the 256 -> 512 -> 1024 ... growth ladder, each step of which copies the
whole payload; a 3 KB packet starting from the 256-byte floor performs five allocations
and memcpy's 1.25x its own size before it is done.

#### Parameters

##### capacity

`number`

#### Returns

`this`

#### Inherited from

`FieldNetworkPacket.reserve`

***

### resetWrite()

> **resetWrite**(): `void`

Defined in: [binaryutils/src/BinaryStream.ts:832](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L832)

Rewinds the write cursor while keeping the allocated capacity, so a long-lived encoder
reaches a steady state where it never allocates again. This is the intended way to reuse
a stream for many packets.

Note the aliasing contract, which it shares with [clear](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/NetworkBinaryStream.md#clear) and [reuse](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/NetworkBinaryStream.md#reuse): any
buffer previously handed out by [getWriteBuffer](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/NetworkBinaryStream.md#getwritebuffer) is a *view* over this stream's
memory and is invalidated by this call. Use [copyOut](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/NetworkBinaryStream.md#copyout) or [copyInto](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/NetworkBinaryStream.md#copyinto) for
output you intend to keep.

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.resetWrite`

***

### reuse()

> **reuse**(`buf`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:996](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L996)

Conventional method to reuse the stream
without having to create a new BinaryStream instance.

The write buffer and its capacity are kept, so any view previously returned by
[getWriteBuffer](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/NetworkBinaryStream.md#getwritebuffer) is invalidated. See [resetWrite](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/NetworkBinaryStream.md#resetwrite).

#### Parameters

##### buf

`Buffer`

The new buffer instance.

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.reuse`

***

### serialize()

> **serialize**(`stream`, `context?`): `Buffer`

Defined in: [protocol/src/NetworkPacket.ts:166](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/protocol/src/NetworkPacket.ts#L166)

Serializes the network packet into a binary stream.

#### Parameters

##### stream

[`NetworkBinaryStream`](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/NetworkBinaryStream.md)

The binary stream to serialize into.

##### context?

[`ProtocolContext`](https://jsprismarine.dev/api/@jsprismarine/protocol/index.md#protocolcontext)

Optional protocol data supplied for the connection.

#### Returns

`Buffer`

The serialized network packet as a Buffer.

#### Inherited from

`FieldNetworkPacket.serialize`

***

### ~~setBuffer()~~

> **setBuffer**(`buf`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:951](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L951)

Sets the buffer for reading.
make sure to reset the reading index!

#### Parameters

##### buf

`Buffer`

The new Buffer.

#### Returns

`void`

#### Deprecated

See [setReadBuffer](#setreadbuffer) and [setWriteBuffer](#setwritebuffer).

#### Inherited from

`FieldNetworkPacket.setBuffer`

***

### setNetId()

> **setNetId**(`id`): `void`

Defined in: [protocol/src/NetworkPacket.ts:89](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/protocol/src/NetworkPacket.ts#L89)

Stamps the id selected by a negotiated protocol version.

#### Parameters

##### id

`number`

The packet id in that version's table.

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.setNetId`

***

### setReadBuffer()

> **setReadBuffer**(`buf`, `rIndex?`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:960](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L960)

Sets the buffer for reading.

#### Parameters

##### buf

`Buffer`

The new Buffer.

##### rIndex?

`number` = `0`

The new read index (default: 0, pass -1 to keep current).

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.setReadBuffer`

***

### setReadIndex()

> **setReadIndex**(`index`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:1006](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L1006)

Sets the reading index.

#### Parameters

##### index

`number`

The new read index.

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.setReadIndex`

***

### setWriteBuffer()

> **setWriteBuffer**(`buf`, `wIndex?`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:970](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L970)

Sets the buffer for writing.

#### Parameters

##### buf

`Buffer`

The new Buffer.

##### wIndex?

`number` = `0`

The new write index (default: 0, pass -1 to keep current).

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.setWriteBuffer`

***

### setWriteIndex()

> **setWriteIndex**(`index`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:1015](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L1015)

Sets the new writing index.

#### Parameters

##### index

`number`

The new write index.

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.setWriteIndex`

***

### skip()

> **skip**(`len`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:904](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L904)

Skips len bytes on the buffer.

#### Parameters

##### len

`number`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.skip`

***

### write()

> **write**(`buf`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:77](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L77)

Appends a buffer to the main buffer.

#### Parameters

##### buf

`Uint8Array`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.write`

***

### writeBoolean()

> **writeBoolean**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:189](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L189)

Writes a boolean (true or false).

#### Parameters

##### v

`boolean`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeBoolean`

***

### writeByte()

> **writeByte**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:153](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L153)

Writes an unsigned byte (0 to 255).

#### Parameters

##### v

`number`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeByte`

***

### writeDouble()

> **writeDouble**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:495](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L495)

Writes a 64 bit (8 bytes) big-endian floating point number.

#### Parameters

##### v

`number`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeDouble`

***

### writeDoubleLE()

> **writeDoubleLE**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:515](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L515)

Writes a 64 bit (8 bytes) little-endian floating point number.

#### Parameters

##### v

`number`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeDoubleLE`

***

### writeFloat()

> **writeFloat**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:452](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L452)

Writes a 32 bit (4 bytes) big-endian floating point number.
An infinity is a float too, and is written as one; NaN is refused.

#### Parameters

##### v

`number`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeFloat`

***

### writeFloatLE()

> **writeFloatLE**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:474](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L474)

Writes a 32 bit (4 bytes) little-endian floating point number.
An infinity is a float too, and is written as one; NaN is refused.

#### Parameters

##### v

`number`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeFloatLE`

***

### writeInt()

> **writeInt**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:371](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L371)

Writes a 32 bit (4 bytes) big-endian signed number.

#### Parameters

##### v

`number`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeInt`

***

### writeIntLE()

> **writeIntLE**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:391](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L391)

Writes a 32 bit (4 bytes) little-endian signed number.

#### Parameters

##### v

`number`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeIntLE`

***

### writeLengthPrefixed()

> **writeLengthPrefixed**(`buf`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:116](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L116)

Writes a varuint32 byte length, then the bytes.

#### Parameters

##### buf

`Uint8Array`

The bytes to append.

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeLengthPrefixed`

***

### writeLong()

> **writeLong**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:535](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L535)

Writes a 64 bit (8 bytes) signed big-endian number.

#### Parameters

##### v

`bigint`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeLong`

***

### writeLongLE()

> **writeLongLE**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:554](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L554)

Writes a 64 bit (8 bytes) signed little-endian number.

#### Parameters

##### v

`bigint`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeLongLE`

***

### writeShort()

> **writeShort**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:207](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L207)

Writes a 16 bit (2 bytes) signed big-endian number.

#### Parameters

##### v

`number`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeShort`

***

### writeShortLE()

> **writeShortLE**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:227](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L227)

Writes a 16 bit (2 bytes) signed little-endian number.

#### Parameters

##### v

`number`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeShortLE`

***

### writeSignedByte()

> **writeSignedByte**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:171](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L171)

Writes a signed byte (-128 to 127).

#### Parameters

##### v

`number`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeSignedByte`

***

### writeTriad()

> **writeTriad**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:287](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L287)

Writes a 24 bit (3 bytes) signed big-endian number.

#### Parameters

##### v

`number`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeTriad`

***

### writeTriadLE()

> **writeTriadLE**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:308](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L308)

Writes a 24 bit (3 bytes) signed little-endian number.

#### Parameters

##### v

`number`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeTriadLE`

***

### writeUnsignedInt()

> **writeUnsignedInt**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:411](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L411)

Writes a 32 bit (4 bytes) big-endian unsigned number.

#### Parameters

##### v

`number`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeUnsignedInt`

***

### writeUnsignedIntLE()

> **writeUnsignedIntLE**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:431](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L431)

Writes a 32 bit (4 bytes) little-endian unsigned number.

#### Parameters

##### v

`number`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeUnsignedIntLE`

***

### writeUnsignedLong()

> **writeUnsignedLong**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:573](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L573)

Writes a 64 bit (8 bytes) unsigned big-endian number.

#### Parameters

##### v

`bigint`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeUnsignedLong`

***

### writeUnsignedLongLE()

> **writeUnsignedLongLE**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:592](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L592)

Writes a 64 bit (8 bytes) unsigned little-endian number.

#### Parameters

##### v

`bigint`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeUnsignedLongLE`

***

### writeUnsignedShort()

> **writeUnsignedShort**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:247](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L247)

Writes a 16 bit (2 bytes) unsigned big-endian number.

#### Parameters

##### v

`number`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeUnsignedShort`

***

### writeUnsignedShortLE()

> **writeUnsignedShortLE**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:267](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L267)

Writes a 16 bit (2 bytes) unsigned little-endian number.

#### Parameters

##### v

`number`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeUnsignedShortLE`

***

### writeUnsignedTriad()

> **writeUnsignedTriad**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:329](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L329)

Writes a 24 bit (3 bytes) unsigned big-endian number.

#### Parameters

##### v

`number`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeUnsignedTriad`

***

### writeUnsignedTriadLE()

> **writeUnsignedTriadLE**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:350](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L350)

Writes a 24 bit (3 bytes) unsigned little-endian number.

#### Parameters

##### v

`number`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeUnsignedTriadLE`

***

### writeUnsignedVarInt()

> **writeUnsignedVarInt**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:662](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L662)

Writes a 32 bit unsigned number with variable-length.

#### Parameters

##### v

`number`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeUnsignedVarInt`

***

### writeUnsignedVarLong()

> **writeUnsignedVarLong**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:747](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L747)

Writes a 64 bit unsigned variable-length number.

#### Parameters

##### v

`bigint`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeUnsignedVarLong`

***

### writeUTF8String()

> **writeUTF8String**(`value`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:92](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L92)

Writes a UTF-8 string directly into the stream's backing buffer.

#### Parameters

##### value

`string`

The string to encode.

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeUTF8String`

***

### writeVarInt()

> **writeVarInt**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:614](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L614)

Writes a 32 bit (4 bytes) zigzag-encoded number.

#### Parameters

##### v

`number`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeVarInt`

***

### writeVarLong()

> **writeVarLong**(`v`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:693](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L693)

Writes a 64 bit unsigned zigzag-encoded number.

#### Parameters

##### v

`bigint`

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeVarLong`

***

### writeVarString()

> **writeVarString**(`str`): `void`

Defined in: [binaryutils/src/BinaryStream.ts:135](https://github.com/JSPrismarine/JSPrismarine/blob/21088b69d7b227110b98eefd29702ff7304762ef/packages/binaryutils/src/BinaryStream.ts#L135)

Writes a string as a varuint32 byte length, then UTF-8 bytes.

#### Parameters

##### str

`string`

The string to write.

#### Returns

`void`

#### Inherited from

`FieldNetworkPacket.writeVarString`
