Skip to content

API reference / @jsprismarine/protocol / UpdateSubChunkNetworkBlockInfo

Class: UpdateSubChunkNetworkBlockInfo ​

Defined in: protocol/src/structure/UpdateSubChunkNetworkBlockInfo.ts:17

One block change inside an UpdateSubChunkBlocksPacket.

Wire layout, in docs order: Pos (a BlockPos, three ZigZag varint32), Runtime Id (varuint32), Update Flags (varuint32, the same bit set UpdateBlockPacket carries: 1 neighbors, 2 network, 4 no graphics, 8 priority), Sync Message - Entity Unique ID (varuint64, the falling block actor the change is synced with, 0 when none), and Sync Message - Message (varuint32: 0 none, 1 block became an actor, 2 actor became a block). https://mojang.github.io/bedrock-protocol-docs/1.26.51/types/update-sub-chunk-network-block-info/

Extends ​

Constructors ​

Constructor ​

new UpdateSubChunkNetworkBlockInfo(position, runtimeId, updateFlags, syncMessageEntityUniqueId, syncMessageType): UpdateSubChunkNetworkBlockInfo

Defined in: protocol/src/structure/UpdateSubChunkNetworkBlockInfo.ts:26

Creates a block change entry.

Parameters ​

position ​

BlockPos

Pos, the absolute block position.

runtimeId ​

number

Runtime Id of the block now at that position.

updateFlags ​

number

Update Flags, how the client applies the change.

syncMessageEntityUniqueId ​

bigint

Sync Message - Entity Unique ID, 0 when the change is not synced with an actor.

syncMessageType ​

number

Sync Message - Message, the transition type, 0 when none.

Returns ​

UpdateSubChunkNetworkBlockInfo

Overrides ​

NetworkStructure.constructor

Properties ​

position ​

position: BlockPos

Defined in: protocol/src/structure/UpdateSubChunkNetworkBlockInfo.ts:27

Pos, the absolute block position.


runtimeId ​

runtimeId: number

Defined in: protocol/src/structure/UpdateSubChunkNetworkBlockInfo.ts:28

Runtime Id of the block now at that position.


syncMessageEntityUniqueId ​

syncMessageEntityUniqueId: bigint

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

Sync Message - Entity Unique ID, 0 when the change is not synced with an actor.


syncMessageType ​

syncMessageType: number

Defined in: protocol/src/structure/UpdateSubChunkNetworkBlockInfo.ts:31

Sync Message - Message, the transition type, 0 when none.


updateFlags ​

updateFlags: number

Defined in: protocol/src/structure/UpdateSubChunkNetworkBlockInfo.ts:29

Update Flags, how the client applies the change.

Methods ​

deserialize() ​

deserialize(stream): void

Defined in: protocol/src/structure/UpdateSubChunkNetworkBlockInfo.ts:46

Reads the five fields in docs order.

Parameters ​

stream ​

BinaryStream

Returns ​

void

Overrides ​

NetworkStructure.deserialize


serialize() ​

serialize(stream): void

Defined in: protocol/src/structure/UpdateSubChunkNetworkBlockInfo.ts:37

Writes the five fields in docs order.

Parameters ​

stream ​

BinaryStream

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