mirror of
https://github.com/mat-1/azalea.git
synced 2024-09-20 07:02:31 +00:00
Merge branch 'main' into azalea-entity
This commit is contained in:
commit
d674633e85
2 changed files with 8 additions and 7 deletions
|
@ -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,
|
||||
}
|
||||
|
|
|
@ -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)?;
|
||||
|
||||
|
|
Loading…
Reference in a new issue