Entity Position Sync
Play 0x23, server → client.
play · 0x23 · clientbound (server → client)
Sets the absolute position, velocity, rotation, and onGround state of the entity entityId. The server sends it to teleport or resync an entity when relative movement packets are not enough. The client moves the entity to the given coordinates.
Sent by the server, read by the client. Listen for it with client.on("EntityPositionSync", (data) => …) on the receiving side.
Fields
| Field | Type | Notes |
|---|---|---|
entityId |
VarInt | |
x |
Double | |
y |
Double | |
z |
Double | |
dx |
Double | also velocityX |
dy |
Double | also velocityY |
dz |
Double | also velocityZ |
yaw |
Float | |
pitch |
Float | |
onGround |
Boolean |
Send it
await client.sendPacket("EntityPositionSync", {
entityId: /* VarInt */,
x: /* Double */,
y: /* Double */,
z: /* Double */,
dx: /* Double */,
dy: /* Double */,
dz: /* Double */,
yaw: /* Float */,
pitch: /* Float */,
onGround: /* Boolean */,
});
Field aliases listed under Notes are accepted as alternative keys when writing.
Source: src/Core/Versions/776/Packets/play/clientbound/EntityPositionSync.ts