← 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.

Released
Protocol
2225

Packet

1 entry

Changed 1

PlayerActionPacket35 changes · ID 36
  • Changed supporting type PlayerActionType: Changed enum value Unknown from 0 to -1.
  • Changed supporting type PlayerActionType: Changed enum value StartDestroyBlock from 1 to 0.
  • Changed supporting type PlayerActionType: Changed enum value AbortDestroyBlock from 2 to 1.
  • Changed supporting type PlayerActionType: Changed enum value StopDestroyBlock from 3 to 2.
  • Changed supporting type PlayerActionType: Changed enum value StartSleeping from 4 to 5.
  • Changed supporting type PlayerActionType: Changed enum value StopSleeping from 5 to 6.
  • Changed supporting type PlayerActionType: Changed enum value Respawn from 6 to 7.
  • Changed supporting type PlayerActionType: Changed enum value StartJump from 7 to 8.
  • Changed supporting type PlayerActionType: Changed enum value StartSprinting from 8 to 9.
  • Changed supporting type PlayerActionType: Changed enum value StopSprinting from 9 to 10.
  • Changed supporting type PlayerActionType: Changed enum value StartSneaking from 10 to 11.
  • Changed supporting type PlayerActionType: Changed enum value StopSneaking from 11 to 12.
  • Changed supporting type PlayerActionType: Changed enum value CreativeDestroyBlock from 12 to 13.
  • Changed supporting type PlayerActionType: Changed enum value ChangeDimensionAck from 13 to 14.
  • Changed supporting type PlayerActionType: Changed enum value StartGliding from 14 to 15.
  • Changed supporting type PlayerActionType: Changed enum value StopGliding from 15 to 16.
  • Changed supporting type PlayerActionType: Changed enum value DenyDestroyBlock from 16 to 17.
  • Changed supporting type PlayerActionType: Changed enum value CrackBlock from 17 to 18.
  • Changed supporting type PlayerActionType: Changed enum value StartSwimming from 18 to 21.
  • Changed supporting type PlayerActionType: Changed enum value StopSwimming from 19 to 22.
  • Changed supporting type PlayerActionType: Changed enum value StartSpinAttack from 20 to 23.
  • Changed supporting type PlayerActionType: Changed enum value StopSpinAttack from 21 to 24.
  • Changed supporting type PlayerActionType: Changed enum value PredictDestroyBlock from 22 to 26.
  • Changed supporting type PlayerActionType: Changed enum value ContinueDestroyBlock from 23 to 27.
  • Changed supporting type PlayerActionType: Changed enum value StartItemUseOn from 24 to 28.
  • Changed supporting type PlayerActionType: Changed enum value StopItemUseOn from 25 to 29.
  • Changed supporting type PlayerActionType: Changed enum value HandledTeleport from 26 to 30.
  • Changed supporting type PlayerActionType: Changed enum value MissedSwing from 27 to 31.
  • Changed supporting type PlayerActionType: Changed enum value StartCrawling from 28 to 32.
  • Changed supporting type PlayerActionType: Changed enum value StopCrawling from 29 to 33.
  • Changed supporting type PlayerActionType: Changed enum value StartFlying from 30 to 34.
  • Changed supporting type PlayerActionType: Changed enum value StopFlying from 31 to 35.
  • Changed supporting type PlayerActionType: Changed enum value StartUsingItem from 32 to 37.
  • Changed supporting type PlayerActionType: Changed enum value InternalUpdate from 33 to 38.
  • Changed supporting type PlayerActionType: Changed enum value Count from 34 to 39.