use crate::util::pack::pack_u16; use super::Packet; #[derive(Clone)] pub struct PacketStatusResponse { pub challenge:u16, pub resume:u16, } impl PacketStatusResponse { pub fn new() -> Self { Self { challenge:0, resume:0, } } } impl Packet for PacketStatusResponse { type Data = Self; fn encode(&self) -> Vec { let mut result = Vec::new(); result.append(&mut pack_u16(self.challenge as u16)); result.append(&mut pack_u16(self.resume as u16)); result } }