← Packet index

Packet 12

AddPlayerPacket

Add Player

A new player joins the game; the server sends this packet to the other players.

Packet datagramWire order
HeaderID 12varuint
0UUIDmce::UUID · variable
1Player Namestring · variable
2Target Runtime IDActorRuntimeID · variable
3Platform Chat Idstring · variable
4PositionVec3 · variable
5VelocityVec3 · variable
6RotationVec2 · variable
7Y-Head Rotationfloat · 4 bytes
8Carried ItemNetworkItemStackDescriptor · variable
9Player Game Typevarint32 · variable (up to 5 bytes)
10Entity DataSynchedActorDataList · variable
11Synched PropertiesPropertySyncData · variable
12Abilities DataSerializedAbilitiesData · variable
13Actor Linksarray<ActorLink> · variable
14Device Idstring · variable
15Build Platformint32 · 4 bytes

Serialized fields

16 top-level fields
  1. 0UUIDThe player's unique account UUID, used to match the entry to a player list entry and skin.mce::UUID
    1. 0Most Significant Bitsuint64
    2. 1Least Significant Bitsuint64
  2. 1Player NameDisplay name of the player.string
  3. 2Target Runtime IDRuntime ID of the spawned player actor.ActorRuntimeID
    1. 0Actor Runtime IDCompressionvaruint64
  4. 3Platform Chat IdPlatform-specific online ID used for platform chat.string
  5. 4PositionSpawn position of the player, with the actor height offset already applied.Vec3
  6. 5VelocityInitial velocity of the player.Vec3
  7. 6RotationBody rotation (pitch, yaw) in degrees.Vec2
  8. 7Y-Head RotationHead yaw rotation in degrees.float
  9. 8Carried ItemThe item currently held by the player.NetworkItemStackDescriptor
  10. 9Player Game TypeThe player's game mode.CompressionEnum-as-ValueGameTypeas varint32
    1. -1Undefined
    2. 0Survival
    3. 1Creative
    4. 2Adventure
    5. 5Default
    6. 6Spectator
    7. 0WorldDefault
  11. 10Entity DataSynched actor data (data items) for the player entity.SynchedActorDataList
    1. 0DataDataItemEntryas array<DataItemEntry>
      1. 0IDCompressionvaruint32
      2. 1PayloadoneOf<DataItemBytePayload, DataItemShortPayload, DataItemIntPayload, DataItemFloatPayload, DataItemStringPayload, DataItemCompoundTagPayload, DataItemPosPayload, DataItemInt64Payload, DataItemVec3Payload>
        0DataItemBytePayloadDataItemBytePayload
        1. 0TypeEnum-as-ValueDataItemTypeas uint8
          1. 0Byte
          2. 1Short
          3. 2Int
          4. 3Float
          5. 4String
          6. 5CompoundTag
          7. 6Pos
          8. 7Int64
          9. 8Vec3
        2. 1Valueint8
        1DataItemShortPayloadDataItemShortPayload
        1. 0TypeEnum-as-ValueDataItemTypeas uint8
          1. 0Byte
          2. 1Short
          3. 2Int
          4. 3Float
          5. 4String
          6. 5CompoundTag
          7. 6Pos
          8. 7Int64
          9. 8Vec3
        2. 1Valueint16
        2DataItemIntPayloadDataItemIntPayload
        1. 0TypeEnum-as-ValueDataItemTypeas uint8
          1. 0Byte
          2. 1Short
          3. 2Int
          4. 3Float
          5. 4String
          6. 5CompoundTag
          7. 6Pos
          8. 7Int64
          9. 8Vec3
        2. 1ValueCompressionvarint32
        3DataItemFloatPayloadDataItemFloatPayload
        1. 0TypeEnum-as-ValueDataItemTypeas uint8
          1. 0Byte
          2. 1Short
          3. 2Int
          4. 3Float
          5. 4String
          6. 5CompoundTag
          7. 6Pos
          8. 7Int64
          9. 8Vec3
        2. 1Valuefloat
        4DataItemStringPayloadDataItemStringPayload
        1. 0TypeEnum-as-ValueDataItemTypeas uint8
          1. 0Byte
          2. 1Short
          3. 2Int
          4. 3Float
          5. 4String
          6. 5CompoundTag
          7. 6Pos
          8. 7Int64
          9. 8Vec3
        2. 1Valuestring
        5DataItemCompoundTagPayloadDataItemCompoundTagPayload
        1. 0TypeEnum-as-ValueDataItemTypeas uint8
          1. 0Byte
          2. 1Short
          3. 2Int
          4. 3Float
          5. 4String
          6. 5CompoundTag
          7. 6Pos
          8. 7Int64
          9. 8Vec3
        2. 1Valueunknown
        6DataItemPosPayloadDataItemPosPayload
        1. 0TypeEnum-as-ValueDataItemTypeas uint8
          1. 0Byte
          2. 1Short
          3. 2Int
          4. 3Float
          5. 4String
          6. 5CompoundTag
          7. 6Pos
          8. 7Int64
          9. 8Vec3
        2. 1ValueBlockPos
          1. 0XCompressionvarint32
          2. 1YCompressionvarint32
          3. 2ZCompressionvarint32
        7DataItemInt64PayloadDataItemInt64Payload
        1. 0TypeEnum-as-ValueDataItemTypeas uint8
          1. 0Byte
          2. 1Short
          3. 2Int
          4. 3Float
          5. 4String
          6. 5CompoundTag
          7. 6Pos
          8. 7Int64
          9. 8Vec3
        2. 1ValueCompressionvarint64
        8DataItemVec3PayloadDataItemVec3Payload
        1. 0TypeEnum-as-ValueDataItemTypeas uint8
          1. 0Byte
          2. 1Short
          3. 2Int
          4. 3Float
          5. 4String
          6. 5CompoundTag
          7. 6Pos
          8. 7Int64
          9. 8Vec3
        2. 1ValueVec3
  12. 11Synched PropertiesSynched entity property values for the player.PropertySyncData
    1. 0Int Entries ListPropertySyncData::PropertySyncIntEntryas array<PropertySyncData::PropertySyncIntEntry>
      1. 0Property IndexCompressionvaruint32
      2. 1DataCompressionvarint32
    2. 1Float Entries ListPropertySyncData::PropertySyncFloatEntryas array<PropertySyncData::PropertySyncFloatEntry>
      1. 0Property IndexCompressionvaruint32
      2. 1Datafloat
  13. 12Abilities DataThe player's permissions and ability layers.SerializedAbilitiesData
    1. 0Target Player Raw Idint64
    2. 1Player PermissionsEnum-as-ValuePlayerPermissionLevelas int8
      1. 0Visitor
      2. 1Member
      3. 2Operator
      4. 3Custom
    3. 2Command PermissionsEnum-as-ValueCommandPermissionLevelas uint8
      1. 0Any
      2. 1GameDirectors
      3. 2Admin
      4. 3Host
      5. 4Owner
      6. 5Internal
    4. 3LayersSerializedAbilitiesDataSerializedLayeras array<SerializedAbilitiesDataSerializedLayer>
      1. 0SerializedLayeruint16
      2. 1AbilitiesSetuint32
      3. 2AbilityValuesuint32
      4. 3FlySpeedfloat
      5. 4VerticalFlySpeedfloat
      6. 5WalkSpeedfloat
  14. 13Actor LinksActor links describing what the player is riding or linked to.ActorLinkas array<ActorLink>
    1. 0Target AActorUniqueID
      1. 0Actor Unique IDCompressionvarint64
    2. 1Target BActorUniqueID
      1. 0Actor Unique IDCompressionvarint64
    3. 2TypeEnum-as-ValueActorLinkTypeas uint8
      1. 0None
      2. 1Riding
      3. 2Passenger
    4. 3Immediateboolean
    5. 4Passenger InitiatedWhether the link was changed by the passengerboolean
    6. 5Vehicle Angular Velocityfloat
  15. 14Device IdA unique device id obtained from the connection request.string
  16. 15Build PlatformThe device/build platform the player is on.Enum-as-ValueBuildPlatformas int32
    1. 1Google
    2. 2iOS
    3. 3OSX
    4. 4Amazon
    5. 8Win32
    6. 9Dedicated
    7. 11Sony
    8. 12Nintendo
    9. 13Xbox
    10. 15Linux
    11. -1Unknown

Changelog

Stable releases

Changes between stable protocol releases.

Released
Protocol
2193

Packet

1 entry

Changed 1

AddPlayerPacket2 changes · ID 12
  • Changed supporting type BuildPlatform: Added enum value Nintendo with value 7.
  • Changed supporting type BuildPlatform: Removed enum value Nx with value 7.