diff options
Diffstat (limited to 'minecraft-protocol/src/packets/mod.rs')
| -rw-r--r-- | minecraft-protocol/src/packets/mod.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/minecraft-protocol/src/packets/mod.rs b/minecraft-protocol/src/packets/mod.rs index 2ccdeb44..bdb80c2f 100644 --- a/minecraft-protocol/src/packets/mod.rs +++ b/minecraft-protocol/src/packets/mod.rs @@ -1,6 +1,7 @@ -pub mod client_intention_packet; - -use std::collections::HashMap; +mod client_intention_packet; +pub use client_intention_packet::ClientIntentionPacket; +mod serverbound_status_request_packet; +pub use serverbound_status_request_packet::ServerboundStatusRequestPacket; use crate::friendly_byte_buf::FriendlyByteBuf; @@ -13,9 +14,8 @@ pub enum ConnectionProtocol { } pub trait Packet { - /// The id of the packet, this is always a byte in vanilla. - /// This might be bigger than a u8 if using modpacks with lots of custom packets? - const ID: u8; - + /// Get the id of the packet, this is always a byte. + fn get_id(&self) -> u8; + fn write(&self, friendly_byte_buf: &mut FriendlyByteBuf) -> (); } |
