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.
- User Defined Biome Name: string.
- 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
userDefinedBiomeName
string
dimension
Returns
SpawnSettings
Overrides
Methods
deserialize()
deserialize(
stream):SpawnSettings
Defined in: protocol/src/structure/SpawnSettings.ts:30
Deserializes the network structure from a binary stream.
Parameters
stream
The binary stream to deserialize from.
Returns
SpawnSettings
Overrides
serialize()
serialize(
stream):void
Defined in: protocol/src/structure/SpawnSettings.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.