From 4ee4687053b7442f518823b08099c156f4da4e83 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 29 Jul 2022 02:59:40 -0500 Subject: Split clientbound and serverbound packets --- azalea-protocol/src/packets/mod.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'azalea-protocol/src/packets/mod.rs') 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), - Handshake(Box), - Login(Box), - Status(Box), -} - /// 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; + fn read(id: u32, buf: &mut impl Read) -> Result; fn write(&self, buf: &mut impl Write) -> Result<(), std::io::Error>; } -- cgit v1.2.3