API reference / @jsprismarine/protocol / NetworkStructure
Abstract Class: NetworkStructure
Defined in: protocol/src/NetworkStructure.ts:8
Base class for protocol structures that read and write fields on a NetworkBinaryStream.
Extended by
ActorLinkAttributeLayerDataAttributeLayerSettingsCameraAimAssistCategoryDefinitionCameraAimAssistCategoryPrioritiesCameraAimAssistPresetDefinitionCameraInstructionCameraPresetCameraSplineDefinitionChunkPosClientStoreEntryPointConfigDataItemDataStoreUpdateDimensionDefinitionEduSharedUriResourceEnvironmentAttributeDataExperimentsItemDataItemInstanceUserDataItemStackLevelSettingsLocatorBarWaypointPayloadNetworkItemStackDescriptorNoiseAlignmentPlayerPartyInfoPresenceConfigPrimitiveShapeDataPropertySyncDataRecipeIngredientSerializableVoxelShapeSerializedAbilitiesDataSerializedAbilityLayerServerWaypointPayloadSpawnSettingsSubChunkHeightmapDataSubChunkPosSubChunkPosOffsetSyncedPlayerMovementSettingsUpdateSubChunkNetworkBlockInfoUUIDVec2FullContainerName
Constructors
Constructor
new NetworkStructure():
NetworkStructure
Returns
NetworkStructure
Methods
deserialize()
abstractdeserialize(stream):void
Defined in: protocol/src/NetworkStructure.ts:19
Deserializes the network structure from a binary stream.
Parameters
stream
The binary stream to deserialize from.
Returns
void
serialize()
abstractserialize(stream):void
Defined in: protocol/src/NetworkStructure.ts:13
Serializes the network structure to a binary stream.
Parameters
stream
The binary stream to serialize to.
Returns
void
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.