API reference / @jsprismarine/protocol / AttributeLayerData2225
Class: AttributeLayerData2225
Defined in: protocol/src/bedrock/structure/AttributeLayerData2225.ts:18
One AttributeLayerData as protocol 2225 sends it, as the UpdateAttributeLayersData alternative of ClientboundAttributeLayerSyncPacket lists them. Protocol 2225 dropped NoiseName from the layer (it moved into the noise transition settings of each attribute) and changed Attributes to EnvironmentAttributeData2225.
Wire order: Name (string), Dimension as a ZigZag varint32, Settings as an AttributeLayerSettings, then Attributes as a varuint32 count followed by one EnvironmentAttributeData2225 each.
See
https://mojang.github.io/bedrock-protocol-docs/1.26.60/types/attribute-layer-data/
Extends
Constructors
Constructor
new AttributeLayerData2225(
name?,dimension?,settings?,attributes?):AttributeLayerData2225
Defined in: protocol/src/bedrock/structure/AttributeLayerData2225.ts:19
Parameters
name?
string = ''
Name of the layer, at most 128 characters.
dimension?
number = 0
Dimension the layer applies to: 0 for the Overworld, 1 for the Nether, 2 for the End, custom ones from 1000.
settings?
AttributeLayerSettings = ...
Settings of the layer.
attributes?
EnvironmentAttributeData2225[] = []
Attributes the layer defines.
Returns
AttributeLayerData2225
Overrides
Properties
attributes
attributes:
EnvironmentAttributeData2225[] =[]
Defined in: protocol/src/bedrock/structure/AttributeLayerData2225.ts:27
Attributes the layer defines.
dimension
dimension:
number=0
Defined in: protocol/src/bedrock/structure/AttributeLayerData2225.ts:23
Dimension the layer applies to: 0 for the Overworld, 1 for the Nether, 2 for the End, custom ones from 1000.
name
name:
string=''
Defined in: protocol/src/bedrock/structure/AttributeLayerData2225.ts:21
Name of the layer, at most 128 characters.
settings
settings:
AttributeLayerSettings
Defined in: protocol/src/bedrock/structure/AttributeLayerData2225.ts:25
Settings of the layer.
Methods
deserialize()
deserialize(
stream):void
Defined in: protocol/src/bedrock/structure/AttributeLayerData2225.ts:42
Reads every field in the order the docs list them.
Parameters
stream
Returns
void
Overrides
serialize()
serialize(
stream):void
Defined in: protocol/src/bedrock/structure/AttributeLayerData2225.ts:33
Writes every field in the order the docs list them.
Parameters
stream
Returns
void
Overrides
deserialize()
staticdeserialize<T>(this,stream):T
Defined in: protocol/src/NetworkStructure.ts:29
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.