Print raw Packet ID when not found

We now will use Raw Packet IDs instead of hex
This commit is contained in:
Snowiiii committed 2024-11-04 21:48:28 +01:00
1 parent 87aa5ec493
commit 3c7106af0b
3 files changed
+5 -5

No files matched your search

+3 -3
View File
@@ -400,7 +400,7 @@ impl Client {
} }
_ => { _ => {
log::error!( log::error!(
"Failed to handle client packet id {:#04x} in Status State", "Failed to handle client packet id {} in Status State",
packet.id.0 packet.id.0
); );
return Err(DeserializerError::UnknownPacket); return Err(DeserializerError::UnknownPacket);
@@ -435,7 +435,7 @@ impl Client {
} }
_ => { _ => {
log::error!( log::error!(
"Failed to handle client packet id {:#04x} in Login State", "Failed to handle client packet id {} in Login State",
packet.id.0 packet.id.0
); );
return Ok(()); return Ok(());
@@ -469,7 +469,7 @@ impl Client {
} }
_ => { _ => {
log::error!( log::error!(
"Failed to handle client packet id {:#04x} in Config State", "Failed to handle client packet id {} in Config State",
packet.id.0 packet.id.0
); );
return Err(DeserializerError::UnknownPacket); return Err(DeserializerError::UnknownPacket);
+1 -1
View File
@@ -722,7 +722,7 @@ impl Player {
} }
SUseItem::PACKET_ID => self.handle_use_item(&SUseItem::read(bytebuf)?), SUseItem::PACKET_ID => self.handle_use_item(&SUseItem::read(bytebuf)?),
_ => { _ => {
log::warn!("Failed to handle player packet id {:#04x}", packet.id.0); log::warn!("Failed to handle player packet id {}", packet.id.0);
// TODO: We give an error if all play packets are implemented // TODO: We give an error if all play packets are implemented
// return Err(Box::new(DeserializerError::UnknownPacket)); // return Err(Box::new(DeserializerError::UnknownPacket));
} }
+1 -1
View File
@@ -43,7 +43,7 @@ impl Scoreboard {
world world
.broadcast_packet_all(&CDisplayObjective::new( .broadcast_packet_all(&CDisplayObjective::new(
pumpkin_protocol::client::play::DisplaySlot::Sidebar, pumpkin_protocol::client::play::DisplaySlot::Sidebar,
"test", objective.name,
)) ))
.await; .await;
} }