Skip to content

API reference / @jsprismarine/protocol / structureTypes

structureTypes ​

Variables ​

commandOriginData ​

const commandOriginData: WireType<CommandOriginData>

Defined in: protocol/src/wire/structureTypes.ts:102

CommandOriginData: who or what ran a command, as the four fields on the wire.


itemStackDescriptor ​

const itemStackDescriptor: WireType<ItemStackDescriptorData>

Defined in: protocol/src/wire/structureTypes.ts:50

NetworkItemStackDescriptor: one item stack, as the six fields on the wire.


metadata ​

const metadata: WireType<Metadata>

Defined in: protocol/src/wire/structureTypes.ts:57

SynchedActorDataList: the entity metadata, as Metadata reads and writes it.


passengerOfBlock ​

const passengerOfBlock: WireType<PassengerOfBlock | null>

Defined in: protocol/src/wire/structureTypes.ts:78

An optional PassengerOfBlockArguments, new at protocol 2225: one presence byte, then the ridden block's five fields. null is not riding.


syncedProperties ​

const syncedProperties: WireType<SyncedProperties>

Defined in: protocol/src/wire/structureTypes.ts:68

PropertySyncData: the client-synced entity property values, two counted lists.


uuid ​

const uuid: WireType<UUID>

Defined in: protocol/src/wire/structureTypes.ts:27

mce::UUID: two 64-bit halves, little endian, most significant first.


vector3 ​

const vector3: WireType<Vector3>

Defined in: protocol/src/wire/structureTypes.ts:39

Vec3 as a math Vector3: three little-endian floats.

The same three bytes-wise as t.vec3, which hands back a plain { x, y, z }. Packets whose positions are Vector3 all the way through use this one so nothing converts at the boundary.

Functions ​

serializedSkin() ​

serializedSkin(layout): WireType<Skin | null>

Defined in: protocol/src/wire/structureTypes.ts:91

SerializedSkin under one of its two layouts: the 2193 one carries the PlayFab id inside the skin, the 2225 one leaves it to the enclosing structure. The layout is a parameter here and a version gate in the field lists that reference this.

Parameters ​

layout ​

SkinWireLayout

Which of the two SerializedSkin layouts to read and write.

Returns ​

WireType<Skin | null>

The wire type for a skin in that layout.