← Packet index

Packet 151

UpdatePlayerGameTypePacket

The server will send this back to all clients on receipt of the SetPlayerGameTypePacket so that cached game type and permissions flags in mLevel on all clients is kept up to date.

Packet datagramWire order
HeaderID 151varuint
0Player Game Typevarint32 · variable (up to 5 bytes)
1Target playerActorUniqueID · variable
2TickPlayerInputTick · variable

Serialized fields

3 top-level fields
  1. 0Player Game TypeCompressionEnum-as-ValueGameTypeas varint32
    1. 0Undefined
    2. 1Survival
    3. 2Creative
    4. 3Adventure
    5. 4Default
    6. 5Spectator
    7. 6WorldDefault
  2. 1Target playerActorUniqueID
    1. 0Actor Unique IDCompressionvarint64
  3. 2TickMost relevant to supply for transitioning into and out of spectator while in motionPlayerInputTick
    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.