aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--azalea-protocol/src/packets/game/clientbound_entity_event_packet.rs4
-rw-r--r--azalea-protocol/src/packets/game/clientbound_level_particles_packet.rs11
-rw-r--r--bot/src/main.rs2
3 files changed, 9 insertions, 8 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)?;
diff --git a/bot/src/main.rs b/bot/src/main.rs
index 2618675e..e2e87456 100644
--- a/bot/src/main.rs
+++ b/bot/src/main.rs
@@ -6,7 +6,7 @@ async fn main() {
println!("Hello, world!");
// let address = "95.111.249.143:10000";
- let address = "localhost:51028";
+ let address = "localhost:61146";
// let response = azalea_client::ping::ping_server(&address.try_into().unwrap())
// .await
// .unwrap();