MCBE
OverviewPacketsAddPlayer
ID 0x0C · 12Server → ClientPlayer

AddPlayer

Spawns another player's entity in the world, with game mode, held item, metadata, abilities and riding links.

add-player.bin
struct AddPlayer {
  uuid.UUID                                    Uuid;
  string                                       Name;
  ActorRuntimeID                               RuntimeId;
  string                                       PlatformOnlineId;
  Vec3                                         Pos;
  Vec3                                         Velocity;
  Vec2                                         Rot;
  float32 (LE)                                 YHeadRot;
  SerializedNetworkItemStackDescriptor         CarriedItem;
  GameType                                     PlayerGameType;
  SynchedActorData.CopyableDataList            Unpack;
  PropertySyncData                             SynchedProperties;
  SerializedAbilitiesData                      AbilitiesData;
  varuint32 [] · ActorLink[]                   Links;
  string                                       DeviceId;
  int32 (LE)                                   BuildPlatform;
}

Structure

FieldTypeDescription
Uuiduuid.UUID
Namestring
Runtime IdActorRuntimeID
Platform Online Idstring
PosVec3
VelocityVec3
RotVec2
Y Head Rotfloat32 (LE)
Carried ItemSerializedNetworkItemStackDescriptor
Player Game TypeGameType
UnpackSynchedActorData.CopyableDataList
Synched PropertiesPropertySyncData
Abilities DataSerializedAbilitiesData
Linksvaruint32 count + ActorLink[]Length-prefixed sequence.
Device Idstring
Build Platformint32 (LE)

Structure of Vec3

FieldTypeDescription
Xfloat32 (LE)
Yfloat32 (LE)
Zfloat32 (LE)

Structure of Vec2

FieldTypeDescription
Xfloat32 (LE)
Yfloat32 (LE)

Structure of SerializedNetworkItemStackDescriptor

cerealizer<NetworkItemStackDescriptor>::SerializedData. ItemStackNetIdVariant's

FieldTypeDescription
Idint16 (LE)
Stack Sizeuint16 (LE)
Aux Valuevaruint32
Net Id Variantoptional byte + varint32Presence flag on the wire; value omitted when absent.
Block Runtime Idvaruint32
User Data Bufferbyte[]

Structure of CopyableDataList

FieldTypeDescription
Datavaruint32 count + DataItemEntry[]Length-prefixed sequence.
FieldTypeDescription
AActorUniqueID
BActorUniqueID
TypeActorLinkType
Immediatebool
Passenger Initiatedbool
Vehicle Angular Velocityfloat32 (LE)

Structure of DataItemEntry

FieldTypeDescription
Idvaruint32
Payloadtagged case index (0=DataItemBytePayload, 1=DataItemShortPayload, 2=DataItemIntPayload, 3=DataItemFloatPayload, 4=DataItemStringPayload, 5=DataItemCompoundTagPayload, 6=DataItemPosPayload, 7=DataItemInt64Payload, 8=DataItemVec3Payload)Variant: an index selects the payload type — see the tables below.

Structure of DataItemBytePayload

FieldTypeDescription
Typeconstant DataItemType.BYTEFixed tag written on the wire.
Valueint8 (LE)

Structure of DataItemShortPayload

FieldTypeDescription
Typeconstant DataItemType.SHORTFixed tag written on the wire.
Valueint16 (LE)

Structure of DataItemIntPayload

FieldTypeDescription
Typeconstant DataItemType.INTFixed tag written on the wire.
Valuevarint32

Structure of DataItemFloatPayload

FieldTypeDescription
Typeconstant DataItemType.FLOATFixed tag written on the wire.
Valuefloat32 (LE)

Structure of DataItemStringPayload

FieldTypeDescription
Typeconstant DataItemType.STRINGFixed tag written on the wire.
Valuestring

Structure of DataItemCompoundTagPayload

FieldTypeDescription
Typeconstant DataItemType.COMPOUND_TAGFixed tag written on the wire.
ValueCompoundTag

Structure of DataItemPosPayload

FieldTypeDescription
Typeconstant DataItemType.POSFixed tag written on the wire.
ValueBlockPos

Structure of DataItemInt64Payload

FieldTypeDescription
Typeconstant DataItemType.INT64Fixed tag written on the wire.
Valuevarint64

Structure of DataItemVec3Payload

FieldTypeDescription
Typeconstant DataItemType.VEC3Fixed tag written on the wire.
ValueVec3

Notes

  • The player must already be in the PlayerList or the skin will not show.