Skip to content

API reference / @jsprismarine/protocol / SpawnSettings

Class: SpawnSettings ​

Defined in: protocol/src/structure/SpawnSettings.ts:15

Where and in which biome a world spawns players (LevelSettings field 1).

Protocol 2193 wire order: 0. Spawn Biome Type: int16 LE.

  1. User Defined Biome Name: string.
  2. Dimension: varint32. https://mojang.github.io/bedrock-protocol-docs/1.26.50/types/spawn-settings/

Extends ​

Constructors ​

Constructor ​

new SpawnSettings(biomeType, userDefinedBiomeName, dimension): SpawnSettings

Defined in: protocol/src/structure/SpawnSettings.ts:16

Parameters ​

biomeType ​

SpawnBiome

userDefinedBiomeName ​

string

dimension ​

Dimension

Returns ​

SpawnSettings

Overrides ​

NetworkStructure.constructor

Methods ​

deserialize() ​

deserialize(stream): SpawnSettings

Defined in: protocol/src/structure/SpawnSettings.ts:30

Deserializes the network structure from a binary stream.

Parameters ​

stream ​

NetworkBinaryStream

The binary stream to deserialize from.

Returns ​

SpawnSettings

Overrides ​

NetworkStructure.deserialize


serialize() ​

serialize(stream): void

Defined in: protocol/src/structure/SpawnSettings.ts:24

Serializes the network structure to a binary stream.

Parameters ​

stream ​

NetworkBinaryStream

The binary stream to serialize to.

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