aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xazalea-client/src/connect.rs8
-rwxr-xr-xazalea-protocol/packet-macros/src/lib.rs2
2 files changed, 8 insertions, 2 deletions
diff --git a/azalea-client/src/connect.rs b/azalea-client/src/connect.rs
index c09d7d9e..0affec8f 100755
--- a/azalea-client/src/connect.rs
+++ b/azalea-client/src/connect.rs
@@ -147,7 +147,10 @@ impl Client {
match r {
Ok(packet) => Self::handle(&packet, &tx, &state, &conn).await,
Err(e) => {
- panic!("Error: {:?}", e);
+ println!("Error: {:?}", e);
+ if e == "length wider than 21-bit" {
+ panic!();
+ }
}
};
}
@@ -233,6 +236,9 @@ impl Client {
GamePacket::ClientboundAddEntityPacket(p) => {
println!("Got add entity packet {:?}", p);
}
+ GamePacket::ClientboundSetEntityDataPacket(p) => {
+ println!("Got set entity data packet {:?}", p);
+ }
_ => panic!("Unexpected packet {:?}", packet),
}
println!();
diff --git a/azalea-protocol/packet-macros/src/lib.rs b/azalea-protocol/packet-macros/src/lib.rs
index 6d1789a8..6c1998b9 100755
--- a/azalea-protocol/packet-macros/src/lib.rs
+++ b/azalea-protocol/packet-macros/src/lib.rs
@@ -392,7 +392,7 @@ pub fn declare_state_packets(input: TokenStream) -> TokenStream {
Ok(match flow {
crate::connect::PacketFlow::ServerToClient => match id {
#clientbound_read_match_contents
- _ => panic!("Unknown ServerToClient {} packet id: {}", #state_name_litstr, id),
+ _ => return Err(format!("Unknown ServerToClient {} packet id: {}", #state_name_litstr, id)),
},
crate::connect::PacketFlow::ClientToServer => match id {
#serverbound_read_match_contents