From 6e818852d868eea963dd2b8489ba75b65c56fb1c Mon Sep 17 00:00:00 2001 From: EightFactorial Date: Mon, 30 Jan 2023 16:18:14 -0800 Subject: More packet fixes, tests, handle error (#61) * Fix packet, fix tests, fixedbitsets * Clippy: Nightmare Mode * Fix mistake * simplify impl Display and make thing pub --------- Co-authored-by: mat --- azalea-protocol/src/packets/game/clientbound_explode_packet.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'azalea-protocol/src/packets/game/clientbound_explode_packet.rs') diff --git a/azalea-protocol/src/packets/game/clientbound_explode_packet.rs b/azalea-protocol/src/packets/game/clientbound_explode_packet.rs index 58070769..2146a254 100755 --- a/azalea-protocol/src/packets/game/clientbound_explode_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_explode_packet.rs @@ -31,9 +31,9 @@ impl McBufReadable for ClientboundExplodePacket { let mut to_blow = Vec::with_capacity(to_blow_len as usize); for _ in 0..to_blow_len { // the bytes are offsets from the main x y z - let x = x_floor + i8::read_from(buf)? as i32; - let y = y_floor + i8::read_from(buf)? as i32; - let z = z_floor + i8::read_from(buf)? as i32; + let x = x_floor + i32::from(i8::read_from(buf)?); + let y = y_floor + i32::from(i8::read_from(buf)?); + let z = z_floor + i32::from(i8::read_from(buf)?); to_blow.push(BlockPos { x, y, z }); } -- cgit v1.2.3