← Packet index

Packet 36

PlayerActionPacket

Sent from the client whenever the player performs an action (dashing, un-dashing, use an item, mine/hit, use a block, etc).

The expected actions change depending on the ServerAuthMovementMode specified in the StartGamePacket. See the PlayerActionType enum for details on which have differing behavior. See also PlayerAuthInputPacket and InventoryTransactionPacket for similar types of player actions.

Packet datagramWire order
HeaderID 36varuint
0Player Runtime IDActorRuntimeID · variable
1Actionvarint32 · variable (up to 5 bytes)
2Block PositionBlockPos · variable
3Result PosBlockPos · variable
4Facevarint32 · variable (up to 5 bytes)

Serialized fields

5 top-level fields
  1. 0Player Runtime IDActorRuntimeID
    1. 0Actor Runtime IDCompressionvaruint64
  2. 1ActionCompressionEnum-as-ValuePlayerActionTypeas varint32
    1. -1Unknown
    2. 0StartDestroyBlock
    3. 1AbortDestroyBlock
    4. 2StopDestroyBlock
    5. 5StartSleeping
    6. 6StopSleeping
    7. 7Respawn
    8. 8StartJump
    9. 9StartSprinting
    10. 10StopSprinting
    11. 11StartSneaking
    12. 12StopSneaking
    13. 13CreativeDestroyBlock
    14. 14ChangeDimensionAck
    15. 15StartGliding
    16. 16StopGliding
    17. 17DenyDestroyBlock
    18. 18CrackBlock
    19. 21StartSwimming
    20. 22StopSwimming
    21. 23StartSpinAttack
    22. 24StopSpinAttack
    23. 26PredictDestroyBlock
    24. 27ContinueDestroyBlock
    25. 28StartItemUseOn
    26. 29StopItemUseOn
    27. 30HandledTeleport
    28. 31MissedSwing
    29. 32StartCrawling
    30. 33StopCrawling
    31. 34StartFlying
    32. 35StopFlying
    33. 37StartUsingItem
    34. 38InternalUpdate
    35. 39Count
  3. 2Block PositionBlockPos
    1. 0XCompressionvarint32
    2. 1YCompressionvarint32
    3. 2ZCompressionvarint32
  4. 3Result PosBlockPos
    1. 0XCompressionvarint32
    2. 1YCompressionvarint32
    3. 2ZCompressionvarint32
  5. 4FaceCompressionvarint32

Changelog

Stable releases

Changes between stable protocol releases.

No stable release changes are recorded for this packet.