diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2022-06-17 23:10:54 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-17 23:10:54 +0000 |
| commit | f414aa4d37e0c6a7adf55b772fa93714be6e9c9c (patch) | |
| tree | 8cfb7d33114b9537b50477d5d6980995eec6cc5c /azalea-client/src | |
| parent | 56f98c1b243d1ba8906ac73a2f2d8eec5646183e (diff) | |
| parent | 0a945e73ec43b3b0389e004e138c83f41cddc532 (diff) | |
| download | azalea-drasl-f414aa4d37e0c6a7adf55b772fa93714be6e9c9c.tar.xz | |
Merge pull request #9 from mat-1/azalea-block
azalea-block
Diffstat (limited to 'azalea-client/src')
| -rwxr-xr-x | azalea-client/src/connect.rs | 10 | ||||
| -rw-r--r-- | azalea-client/src/entity.rs | 5 | ||||
| -rw-r--r-- | azalea-client/src/player.rs | 2 |
3 files changed, 14 insertions, 3 deletions
diff --git a/azalea-client/src/connect.rs b/azalea-client/src/connect.rs index cb2bec9c..1551ca69 100755 --- a/azalea-client/src/connect.rs +++ b/azalea-client/src/connect.rs @@ -1,5 +1,5 @@ use crate::Player; -use azalea_core::{resource_location::ResourceLocation, ChunkPos}; +use azalea_core::{resource_location::ResourceLocation, ChunkPos, EntityPos}; use azalea_protocol::{ connect::{GameConnection, HandshakeConnection}, packets::{ @@ -351,6 +351,11 @@ impl Client { } GamePacket::ClientboundAddEntityPacket(p) => { println!("Got add entity packet {:?}", p); + let pos = EntityPos { + x: p.x, + y: p.y, + z: p.z, + }; } GamePacket::ClientboundSetEntityDataPacket(p) => { // println!("Got set entity data packet {:?}", p); @@ -447,6 +452,9 @@ impl Client { GamePacket::ClientboundServerDataPacket(p) => { println!("Got server data packet {:?}", p); } + GamePacket::ClientboundSetEquipmentPacket(p) => { + println!("Got set equipment packet {:?}", p); + } _ => panic!("Unexpected packet {:?}", packet), } } diff --git a/azalea-client/src/entity.rs b/azalea-client/src/entity.rs index ed8aa68d..d91f556f 100644 --- a/azalea-client/src/entity.rs +++ b/azalea-client/src/entity.rs @@ -1,5 +1,8 @@ -#[derive(Default)] +use azalea_core::EntityPos; + +#[derive(Default, Debug)] pub struct Entity { /// The incremental numerical id of the entity. pub id: u32, + pub pos: EntityPos, } diff --git a/azalea-client/src/player.rs b/azalea-client/src/player.rs index fc54ff93..04d34f6d 100644 --- a/azalea-client/src/player.rs +++ b/azalea-client/src/player.rs @@ -1,6 +1,6 @@ use crate::Entity; -#[derive(Default)] +#[derive(Default, Debug)] pub struct Player { /// The entity attached to the player. There's some useful fields here. pub entity: Entity, |
