mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-31 20:32:34 +00:00
fix: bedrock movement
also added a bunch of docs, and fixed bedrock air bubbles constantly shown, and also fix bedrock block states
This commit is contained in:
@@ -2,11 +2,25 @@ use pumpkin_data::packet::clientbound::PLAY_PLAYER_ABILITIES;
|
||||
use pumpkin_macros::packet;
|
||||
use serde::Serialize;
|
||||
|
||||
/// Updates the player's movement and interaction abilities.
|
||||
///
|
||||
/// This packet informs the client about the player's state (flying, invulnerable)
|
||||
/// and sets the movement speeds. While the client applies these visuals,
|
||||
/// the server must still validate these states to prevent cheating.
|
||||
#[derive(Serialize)]
|
||||
#[packet(PLAY_PLAYER_ABILITIES)]
|
||||
pub struct CPlayerAbilities {
|
||||
/// A bitmask of player states.
|
||||
/// Bit 0 (0x01): Invulnerable (Creative mode)
|
||||
/// Bit 1 (0x02): Flying
|
||||
/// Bit 2 (0x04): Allow Flying
|
||||
/// Bit 3 (0x08): Creative Mode (Instant Break)
|
||||
pub flags: i8,
|
||||
/// The multiplier for flying speed.
|
||||
/// Default is 0.05.
|
||||
pub flying_speed: f32,
|
||||
/// The field of view modifier (Walking speed multiplier).
|
||||
/// Default is 0.1.
|
||||
pub field_of_view: f32,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user