MCBE
OverviewPacketsAddActor
ID 0x0D · 13Server → ClientEntities

AddActor

Spawns a non-player entity (mob, projectile, item-less actor) with type identifier, attributes, metadata and links.

add-actor.bin
struct AddActor {
  ActorUniqueID                                EntityId;
  ActorRuntimeID                               RuntimeId;
  string                                       ActorType;
  Vec3                                         Pos;
  Vec3                                         Velocity;
  Vec2                                         Rot;
  float32 (LE)                                 YHeadRotation;
  float32 (LE)                                 YBodyRotation;
  varuint32 [] · SyncedAttribute[]             Attributes;
  SynchedActorData.CopyableDataList            Data;
  PropertySyncData                             SynchedProperties;
  varuint32 [] · ActorLink[]                   Links;
}

Structure

FieldTypeDescription
Entity IdActorUniqueID
Runtime IdActorRuntimeID
Actor Typestring
PosVec3
VelocityVec3
RotVec2
Y Head Rotationfloat32 (LE)
Y Body Rotationfloat32 (LE)
Attributesvaruint32 count + SyncedAttribute[]Length-prefixed sequence.
DataSynchedActorData.CopyableDataList
Synched PropertiesPropertySyncData
Linksvaruint32 count + ActorLink[]Length-prefixed sequence.

Structure of Vec3

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

Structure of Vec2

FieldTypeDescription
Xfloat32 (LE)
Yfloat32 (LE)

Structure of SyncedAttribute

FieldTypeDescription
Namestring
Min Valuefloat32 (LE)
Current Valuefloat32 (LE)
Max Valuefloat32 (LE)

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

  • No special notes.