1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 23:44:38 +00:00
azalea/minecraft-protocol/src/packets/mod.rs

19 lines
513 B
Rust

mod client_intention_packet;
pub use client_intention_packet::ClientIntentionPacket;
mod serverbound_status_request_packet;
pub use serverbound_status_request_packet::ServerboundStatusRequestPacket;
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum ConnectionProtocol {
Handshaking = -1,
Play = 0,
Status = 1,
Login = 2,
}
pub trait Packet {
/// Get the id of the packet, this is always a byte.
fn get_id(&self) -> u32;
fn write(&self, friendly_byte_buf: &mut Vec<u8>) -> ();
}