diff options
| author | mat <github@matdoes.dev> | 2022-06-19 14:00:51 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-06-19 14:00:51 -0500 |
| commit | d674633e856f0ac1683172ad5655ff7026c6eae6 (patch) | |
| tree | c24169e74bf3b5affadeda757694e504d2054da0 | |
| parent | e84893b07a65ebca8d4027b386d3dfd87bcfd009 (diff) | |
| parent | 405a00c0d1908a4b3fbd8e6684c77dfb178ac55d (diff) | |
| download | azalea-drasl-d674633e856f0ac1683172ad5655ff7026c6eae6.tar.xz | |
Merge branch 'main' into azalea-entity
| -rw-r--r-- | azalea-protocol/src/packets/game/clientbound_entity_event_packet.rs | 4 | ||||
| -rw-r--r-- | azalea-protocol/src/packets/game/clientbound_level_particles_packet.rs | 11 |
2 files changed, 8 insertions, 7 deletions
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<Self, String> { - 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)?; |
