1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 06:16:04 +00:00

Fix declare_state_packets

This commit is contained in:
mat 2022-04-19 21:24:42 -05:00
parent a3fad4765b
commit cafa4dd76f
2 changed files with 3 additions and 3 deletions

View file

@ -38,7 +38,7 @@ pub async fn ping_server(
let packet = conn.read().await.unwrap();
match packet {
StatusPacket::ClientboundStatusResponsePacket(p) => Ok(*p),
StatusPacket::ClientboundStatusResponsePacket(p) => Ok(p),
_ => Err("Invalid packet type".to_string()),
}
}

View file

@ -286,11 +286,11 @@ pub fn declare_state_packets(input: TokenStream) -> TokenStream {
{
Ok(match flow {
crate::connect::PacketFlow::ServerToClient => match id {
#serverbound_read_match_contents
#clientbound_read_match_contents
_ => panic!("Unknown ServerToClient {} packet id: {}", #state_name_litstr, id),
},
crate::connect::PacketFlow::ClientToServer => match id {
#clientbound_read_match_contents
#serverbound_read_match_contents
_ => return Err(format!("Unknown ClientToServer {} packet id: {}", #state_name_litstr, id)),
},
})