#[non_exhaustive]pub enum Packet {
Show 18 variants
StartSneaking,
StopSneaking,
StartSprinting,
StopSprinting,
Abilities(Abilities),
StartRidingJump {
strength: i32,
},
StopRidingJump,
Flying {
on_ground: bool,
},
Position {
x: f64,
y: f64,
z: f64,
on_ground: bool,
},
Look {
yaw: f32,
pitch: f32,
on_ground: bool,
},
Move {
pos: Option<[f64; 3]>,
look: Option<(f32, f32)>,
on_ground: bool,
horizontal_collision: bool,
},
PlayerInput(Keys),
PlayerLoaded,
StartFallFlying,
MoveVehicle {
pos: [f64; 3],
yaw: f32,
pitch: f32,
on_ground: bool,
},
SteerVehicle {
sideways: f32,
forward: f32,
jump: bool,
sneak: bool,
},
PaddleBoat {
left: bool,
right: bool,
},
PositionLook {
x: f64,
y: f64,
z: f64,
yaw: f32,
pitch: f32,
on_ground: bool,
},
}Expand description
A movement-related packet the client sends, in the order the tick produced it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
StartSneaking
Entity action “start sneaking”.
StopSneaking
Entity action “stop sneaking”.
StartSprinting
Entity action “start sprinting”.
StopSprinting
Entity action “stop sprinting”.
Abilities(Abilities)
Abilities update (sent when the client toggles flight).
StartRidingJump
Entity action “start riding jump”: the rider let go of the jump key with a mount’s jump
bar charged; strength is the bar ×100 as the action’s jump-boost value.
StopRidingJump
Entity action “stop riding jump” (1.9+).
Flying
Ground flag only.
Position
Position (y is the bounding box bottom).
Look
Rotation.
Move
A modern (26.x) movement packet: position and / or rotation (both absent = status only), on-ground and horizontal-collision flags.
Fields
PlayerInput(Keys)
The modern player_input packet: the key state, sent when it changes.
PlayerLoaded
The 26.1 player_loaded packet: the client has loaded the level (see
modern::LoadGate).
StartFallFlying
The modern player_command START_FALL_FLYING: the client started gliding (see
modern::PlayerExt).
MoveVehicle
The modern vehicle_move packet: the position and rotation of the vehicle the player
controls (see modern::Boat).
Fields
SteerVehicle
The legacy (1.9 - 1.21.1) steer_vehicle packet: the passenger’s movement input after
its tick (sideways, forward after the ×0.98), jump and sneak keys.
Fields
PaddleBoat
The modern steer_boat (paddle) packet: the boat’s paddle states, sent every boat tick.
PositionLook
Position and rotation.