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:
parent
5306d99e33
commit
df318dba73
2 changed files with 3 additions and 3 deletions
|
@ -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()),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)),
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue