← Packet index

Packet 161

CorrectPlayerMovePredictionPacket

Sent to a player when their simulation of movement mismatches enough from the server that it wants to correct the client.

Used only in server authoritative movement mode, see ServerAuthMovementMode documentation.<br> Since it is sent to the specified client the target player is implied to be the receiver.<br> It is an optional part of the server authoritative protocol. A server could choose to never send this or do all corrections through MovePlayerPacket, although doing so would likely provide less smooth results.

Packet datagramWire order
HeaderID 161varuint
0PredictionTypeuint8 · 1 byte
1PosVec3 · variable
2Pos DeltaVec3 · variable
3RotationVec2 · variable
4VehicleAngularVelocityfloat · 4 bytes
5On Groundboolean · 1 byte
6TickPlayerInputTick · variable

Serialized fields

7 top-level fields
  1. 0PredictionTypeVehicle or Player PredictionEnum-as-ValueRewindTypeas uint8
    1. 0Player
    2. 1Vehicle
  2. 1PosCorrected positionVec3
  3. 2Pos DeltaCorrected velocityVec3
  4. 3RotationCorrected rotation. Only sent when PredictionType is VehicleVec2
  5. 4VehicleAngularVelocityoptionalAngular Velocity for a vehicle. Only sent when PredictionType is Vehiclefloat
  6. 5On GroundIs on groundboolean
  7. 6TickWhich frame we're correcting; should match the tick in the Player Auth Input packetPlayerInputTick
    1. 0Input tickIn server authoritative movement mode the client supplies this in PlayerAuthInputPacket. For any client-bound packets containing a tick, the server should supply the tick value corresponding to the most recently processed PlayerAuthInputPacket. This allows the client to adjust any client predictions made while the packet was in flight. If the packet is being sent to the client but not relating to data of the player or a client-predicted vehicle, it can be zero. It is also acceptable to specify zero for players, although this may lead to minor visual flickers and less smooth application of CorrectPlayerMovePredictionPacket.Compressionvaruint64

Changelog

Stable releases

Changes between stable protocol releases.

No stable release changes are recorded for this packet.