← Back to Index

VoxelShapesPacket (337)

Syncs client with server voxel shape data on world join. This packet contains a copy of all behavior pack voxel shapes data and is used by StartGamePacket.
Sends the serializable voxel shapes data to the client as it's needed on both the client and server. This packet should always be sent before StartGamePacket.
Field Name Type Field Index Description
Shapes (Required) array<VoxelShapes::SerializableVoxelShape> 0 Voxel shape structural data

VoxelShapes::SerializableVoxelShape (Array Item)

Field Name Type Field Index Description
Cells (Required) VoxelShapes::SerializableCells 0 Grid of cells representing solid and empty regions

VoxelShapes::SerializableCells

Field Name Type Field Index Description
X Size (Required) uint8 0 Number of cells along the X axis
Y Size (Required) uint8 1 Number of cells along the Y axis
Z Size (Required) uint8 2 Number of cells along the Z axis
Storage (Required) array<uint8> 3 Solid/empty state per cell
X Coordinates (Required) array<float> 1 Cell boundaries along the X axis
Y Coordinates (Required) array<float> 2 Cell boundaries along the Y axis
Z Coordinates (Required) array<float> 3 Cell boundaries along the Z axis
Name Map (Required) object<hashed_string, VoxelShapes::RegistryHandle> 1 Voxel shape name-to-handle mappings

Map Entry

Field Name Type Field Index Description
key hashed_string
value VoxelShapes::RegistryHandle

VoxelShapes::RegistryHandle

Field Name Type Field Index Description
Value (Required) uint16 0
Custom Shape Count (Required) uint16 2 The number of custom voxel shapes