ID 0x0D · 13Server → ClientEntities
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
| Field | Type | Description |
|---|
| Entity Id | ActorUniqueID | |
| Runtime Id | ActorRuntimeID | |
| Actor Type | string | |
| Pos | Vec3 | |
| Velocity | Vec3 | |
| Rot | Vec2 | |
| Y Head Rotation | float32 (LE) | |
| Y Body Rotation | float32 (LE) | |
| Attributes | varuint32 count + SyncedAttribute[] | Length-prefixed sequence. |
| Data | SynchedActorData.CopyableDataList | |
| Synched Properties | PropertySyncData | |
| Links | varuint32 count + ActorLink[] | Length-prefixed sequence. |
Structure of Vec3
| Field | Type | Description |
|---|
| X | float32 (LE) | |
| Y | float32 (LE) | |
| Z | float32 (LE) | |
Structure of Vec2
| Field | Type | Description |
|---|
| X | float32 (LE) | |
| Y | float32 (LE) | |
Structure of SyncedAttribute
| Field | Type | Description |
|---|
| Name | string | |
| Min Value | float32 (LE) | |
| Current Value | float32 (LE) | |
| Max Value | float32 (LE) | |
Structure of CopyableDataList
| Field | Type | Description |
|---|
| Data | varuint32 count + DataItemEntry[] | Length-prefixed sequence. |
Structure of ActorLink
| Field | Type | Description |
|---|
| A | ActorUniqueID | |
| B | ActorUniqueID | |
| Type | ActorLinkType | |
| Immediate | bool | |
| Passenger Initiated | bool | |
| Vehicle Angular Velocity | float32 (LE) | |
Structure of DataItemEntry
| Field | Type | Description |
|---|
| Id | varuint32 | |
| Payload | tagged 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
| Field | Type | Description |
|---|
| Type | constant DataItemType.BYTE | Fixed tag written on the wire. |
| Value | int8 (LE) | |
Structure of DataItemShortPayload
| Field | Type | Description |
|---|
| Type | constant DataItemType.SHORT | Fixed tag written on the wire. |
| Value | int16 (LE) | |
Structure of DataItemIntPayload
| Field | Type | Description |
|---|
| Type | constant DataItemType.INT | Fixed tag written on the wire. |
| Value | varint32 | |
Structure of DataItemFloatPayload
| Field | Type | Description |
|---|
| Type | constant DataItemType.FLOAT | Fixed tag written on the wire. |
| Value | float32 (LE) | |
Structure of DataItemStringPayload
| Field | Type | Description |
|---|
| Type | constant DataItemType.STRING | Fixed tag written on the wire. |
| Value | string | |
Structure of DataItemCompoundTagPayload
| Field | Type | Description |
|---|
| Type | constant DataItemType.COMPOUND_TAG | Fixed tag written on the wire. |
| Value | CompoundTag | |
Structure of DataItemPosPayload
| Field | Type | Description |
|---|
| Type | constant DataItemType.POS | Fixed tag written on the wire. |
| Value | BlockPos | |
Structure of DataItemInt64Payload
| Field | Type | Description |
|---|
| Type | constant DataItemType.INT64 | Fixed tag written on the wire. |
| Value | varint64 | |
Structure of DataItemVec3Payload
| Field | Type | Description |
|---|
| Type | constant DataItemType.VEC3 | Fixed tag written on the wire. |
| Value | Vec3 | |
Notes