diff --git a/azalea-protocol/src/packets/game/clientbound_entity_event_packet.rs b/azalea-protocol/src/packets/game/clientbound_entity_event_packet.rs index 1b06bff7..d0cc7222 100644 --- a/azalea-protocol/src/packets/game/clientbound_entity_event_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_entity_event_packet.rs @@ -3,6 +3,6 @@ use packet_macros::{GamePacket, McBuf}; // we can't identify the status in azalea-protocol since they vary depending on the entity #[derive(Clone, Debug, McBuf, GamePacket)] pub struct ClientboundEntityEventPacket { - pub entity_id: i32, - pub entity_status: i8, + pub entity_id: u32, + pub event_id: u8, } diff --git a/azalea-protocol/src/packets/game/clientbound_level_particles_packet.rs b/azalea-protocol/src/packets/game/clientbound_level_particles_packet.rs index a3538598..9ed08d8a 100644 --- a/azalea-protocol/src/packets/game/clientbound_level_particles_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_level_particles_packet.rs @@ -1,10 +1,11 @@ -use std::io::{Read, Write}; - +use crate::mc_buf::McBufVarReadable; use crate::mc_buf::{McBufReadable, McBufWritable, ParticleData}; use packet_macros::GamePacket; +use std::io::{Read, Write}; #[derive(Clone, Debug, GamePacket)] pub struct ClientboundLevelParticlesPacket { + #[var] pub particle_id: u32, pub override_limiter: bool, pub x: f64, @@ -14,13 +15,13 @@ pub struct ClientboundLevelParticlesPacket { pub y_dist: f32, pub z_dist: f32, pub max_speed: f32, - pub count: i32, + pub count: u32, pub data: ParticleData, } impl McBufReadable for ClientboundLevelParticlesPacket { fn read_into(buf: &mut impl Read) -> Result { - let particle_id = u32::read_into(buf)?; + let particle_id = u32::var_read_into(buf)?; let override_limiter = bool::read_into(buf)?; let x = f64::read_into(buf)?; let y = f64::read_into(buf)?; @@ -29,7 +30,7 @@ impl McBufReadable for ClientboundLevelParticlesPacket { let y_dist = f32::read_into(buf)?; let z_dist = f32::read_into(buf)?; let max_speed = f32::read_into(buf)?; - let count = i32::read_into(buf)?; + let count = u32::read_into(buf)?; let data = ParticleData::read_from_particle_id(buf, particle_id)?;