From 06e14178cd1623e7a9b57c7e1cf52aed6d084dd0 Mon Sep 17 00:00:00 2001 From: Jack Crump-Leys <51773589+JackCrumpLeys@users.noreply.github.com> Date: Tue, 19 Sep 2023 08:12:58 +1200 Subject: [PATCH] fix explosion packet (#527) # Objective fix explosion packet # Solution fix some of the fields in accordance with https://wiki.vg/Protocol#Explosion. --- .../valence_protocol/src/packets/play/explosion_s2c.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/valence_protocol/src/packets/play/explosion_s2c.rs b/crates/valence_protocol/src/packets/play/explosion_s2c.rs index 6f6e80d09..c3486a58b 100644 --- a/crates/valence_protocol/src/packets/play/explosion_s2c.rs +++ b/crates/valence_protocol/src/packets/play/explosion_s2c.rs @@ -1,13 +1,13 @@ use std::borrow::Cow; -use valence_math::DVec3; +use valence_math::{DVec3, Vec3}; -use crate::{BlockPos, Decode, Encode, Packet, Velocity}; +use crate::{Decode, Encode, Packet}; #[derive(Clone, Debug, Encode, Decode, Packet)] pub struct ExplosionS2c<'a> { pub pos: DVec3, - pub radius: f32, - pub affected_blocks: Cow<'a, [BlockPos]>, - pub player_velocity: Velocity, + pub strength: f32, + pub affected_blocks: Cow<'a, [[i8; 3]]>, + pub player_motion: Vec3, }