Skip to main content

Crate basalt_mc_protocol

Crate basalt_mc_protocol 

Source
Expand description

Minecraft packet definitions and version-aware packet registry.

This crate defines all Minecraft protocol packets as Rust structs with derive-generated Encode/Decode/EncodedSize implementations. Packets are organized by connection state (Handshake, Status, Login, Configuration, Play) and direction (serverbound/clientbound).

The PacketRegistry provides version-aware packet dispatching: given a protocol version, connection state, direction, and packet ID, it decodes the raw bytes into the correct typed enum variant.

Re-exports§

pub use error::Error;
pub use error::Result;
pub use registry::PacketRegistry;
pub use state::ConnectionState;
pub use version::ProtocolVersion;

Modules§

error
packets
Minecraft packet definitions organized by connection state.
registry
registry_data
Registry data required for the Configuration state.
state
types
Hand-rolled protocol types — used as a deliberate exception when the codegen IR cannot model a Mojang protocol pattern cleanly.
version