diff options
| author | mat <github@matdoes.dev> | 2022-07-29 02:59:40 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-07-29 02:59:40 -0500 |
| commit | 4ee4687053b7442f518823b08099c156f4da4e83 (patch) | |
| tree | 11bb56330ed172a961d0a19069a086798d0aa804 /azalea-protocol/src/packets/mod.rs | |
| parent | aadf2de3cb751d563e743599a7fb345c08010f5a (diff) | |
| download | azalea-drasl-4ee4687053b7442f518823b08099c156f4da4e83.tar.xz | |
Split clientbound and serverbound packets
Diffstat (limited to 'azalea-protocol/src/packets/mod.rs')
| -rw-r--r-- | azalea-protocol/src/packets/mod.rs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/azalea-protocol/src/packets/mod.rs b/azalea-protocol/src/packets/mod.rs index fbccc087..228d7c74 100644 --- a/azalea-protocol/src/packets/mod.rs +++ b/azalea-protocol/src/packets/mod.rs @@ -3,7 +3,6 @@ pub mod handshake; pub mod login; pub mod status; -use crate::connect::PacketFlow; use azalea_buf::{McBufWritable, Readable, Writable}; use std::io::{Read, Write}; @@ -29,14 +28,6 @@ impl ConnectionProtocol { } } -#[derive(Clone, Debug)] -pub enum Packet { - Game(Box<game::GamePacket>), - Handshake(Box<handshake::HandshakePacket>), - Login(Box<login::LoginPacket>), - Status(Box<status::StatusPacket>), -} - /// An enum of packets for a certain protocol pub trait ProtocolPacket where @@ -45,7 +36,7 @@ where fn id(&self) -> u32; /// Read a packet by its id, ConnectionProtocol, and flow - fn read(id: u32, flow: &PacketFlow, buf: &mut impl Read) -> Result<Self, String>; + fn read(id: u32, buf: &mut impl Read) -> Result<Self, String>; fn write(&self, buf: &mut impl Write) -> Result<(), std::io::Error>; } |
