diff options
| author | EightFactorial <murphkev000@gmail.com> | 2023-01-25 09:51:27 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-25 11:51:27 -0600 |
| commit | 9a66cb97a659ed1f0e52ba3d9438de1d9b78d64a (patch) | |
| tree | 16405cec7c45fb952509a5f93f6970b511315046 /azalea-protocol/src/packets/game/clientbound_level_particles_packet.rs | |
| parent | 473c74175c3a8189616bded528e3e6e4785dd3c8 (diff) | |
| download | azalea-drasl-9a66cb97a659ed1f0e52ba3d9438de1d9b78d64a.tar.xz | |
Fix test and packets (#60)
* Fix test and packets
* Fix bug, fix a couple more packets
* add tests and fix stuff
* fix warnings
Co-authored-by: Ubuntu <github@matdoes.dev>
Diffstat (limited to 'azalea-protocol/src/packets/game/clientbound_level_particles_packet.rs')
| -rwxr-xr-x | azalea-protocol/src/packets/game/clientbound_level_particles_packet.rs | 17 |
1 files changed, 14 insertions, 3 deletions
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 eaa34669..6efe1f97 100755 --- a/azalea-protocol/src/packets/game/clientbound_level_particles_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_level_particles_packet.rs @@ -1,4 +1,4 @@ -use azalea_buf::{BufReadError, McBufReadable, McBufVarReadable, McBufWritable}; +use azalea_buf::{BufReadError, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable}; use azalea_core::ParticleData; use azalea_protocol_macros::ClientboundGamePacket; use std::io::{Cursor, Write}; @@ -51,7 +51,18 @@ impl McBufReadable for ClientboundLevelParticlesPacket { } impl McBufWritable for ClientboundLevelParticlesPacket { - fn write_into(&self, _buf: &mut impl Write) -> Result<(), std::io::Error> { - todo!(); + fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + self.particle_id.var_write_into(buf)?; + self.override_limiter.write_into(buf)?; + self.x.write_into(buf)?; + self.y.write_into(buf)?; + self.z.write_into(buf)?; + self.x_dist.write_into(buf)?; + self.y_dist.write_into(buf)?; + self.z_dist.write_into(buf)?; + self.max_speed.write_into(buf)?; + self.count.write_into(buf)?; + self.data.write_without_id(buf)?; + Ok(()) } } |
