aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/game
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-06-23 15:12:17 -0500
committermat <github@matdoes.dev>2022-06-23 15:12:17 -0500
commit5ca49e680ed8519456dc9a9af84321d4b69dcbb3 (patch)
tree0f727c3e862f60eb227db69c87946a0f629a397d /azalea-protocol/src/packets/game
parentc7b0c51274b5d8548c8a2f829b75dfbec4038be2 (diff)
downloadazalea-drasl-5ca49e680ed8519456dc9a9af84321d4b69dcbb3.tar.xz
azalea-buf
Diffstat (limited to 'azalea-protocol/src/packets/game')
-rw-r--r--azalea-protocol/src/packets/game/clientbound_add_player_packet.rs3
-rw-r--r--azalea-protocol/src/packets/game/clientbound_move_entity_pos_packet.rs5
-rw-r--r--azalea-protocol/src/packets/game/clientbound_move_entity_posrot_packet.rs8
3 files changed, 8 insertions, 8 deletions
diff --git a/azalea-protocol/src/packets/game/clientbound_add_player_packet.rs b/azalea-protocol/src/packets/game/clientbound_add_player_packet.rs
index f1947d09..4dae88a5 100644
--- a/azalea-protocol/src/packets/game/clientbound_add_player_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_add_player_packet.rs
@@ -1,10 +1,11 @@
use packet_macros::{GamePacket, McBuf};
use uuid::Uuid;
+/// This packet is sent by the server when a player comes into visible range, not when a player joins.
#[derive(Clone, Debug, McBuf, GamePacket)]
pub struct ClientboundAddPlayerPacket {
#[var]
- pub id: i32,
+ pub id: u32,
pub uuid: Uuid,
pub x: f64,
pub y: f64,
diff --git a/azalea-protocol/src/packets/game/clientbound_move_entity_pos_packet.rs b/azalea-protocol/src/packets/game/clientbound_move_entity_pos_packet.rs
index 0fc0104a..714917b7 100644
--- a/azalea-protocol/src/packets/game/clientbound_move_entity_pos_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_move_entity_pos_packet.rs
@@ -1,11 +1,10 @@
+use azalea_core::EntityPos;
use packet_macros::{GamePacket, McBuf};
#[derive(Clone, Debug, McBuf, GamePacket)]
pub struct ClientboundMoveEntityPosPacket {
#[var]
pub entity_id: i32,
- pub xa: i16,
- pub ya: i16,
- pub za: i16,
+ pub delta: PositionDelta,
pub on_ground: bool,
}
diff --git a/azalea-protocol/src/packets/game/clientbound_move_entity_posrot_packet.rs b/azalea-protocol/src/packets/game/clientbound_move_entity_posrot_packet.rs
index 5fde1b93..b02a2981 100644
--- a/azalea-protocol/src/packets/game/clientbound_move_entity_posrot_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_move_entity_posrot_packet.rs
@@ -1,12 +1,12 @@
+use super::clientbound_move_entity_pos_packet::PositionDelta;
use packet_macros::{GamePacket, McBuf};
+/// This packet is sent by the server when an entity moves less then 8 blocks.
#[derive(Clone, Debug, McBuf, GamePacket)]
pub struct ClientboundMoveEntityPosRotPacket {
#[var]
- pub entity_id: i32,
- pub xa: i16,
- pub ya: i16,
- pub za: i16,
+ pub entity_id: u32,
+ pub delta: PositionDelta,
pub y_rot: i8,
pub x_rot: i8,
pub on_ground: bool,