diff options
| author | mat <github@matdoes.dev> | 2022-06-23 21:31:19 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-06-23 21:31:19 -0500 |
| commit | 2cdbdcaa27c812e569c7c1a13d83182446e7f18b (patch) | |
| tree | c4f2970d847ec411bf6e859bc1521e93bc8b3c81 /azalea-client/src | |
| parent | 37c6618c16319a7f40fd2e165190407472598e84 (diff) | |
| download | azalea-drasl-2cdbdcaa27c812e569c7c1a13d83182446e7f18b.tar.xz | |
move_entity_with_delta
Diffstat (limited to 'azalea-client/src')
| -rw-r--r-- | azalea-client/src/client.rs | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs index a7841637..6efe521b 100644 --- a/azalea-client/src/client.rs +++ b/azalea-client/src/client.rs @@ -433,20 +433,16 @@ impl Client { // println!("Got rotate head packet {:?}", p); } GamePacket::ClientboundMoveEntityPosPacket(p) => { - // println!("Got move entity pos packet {:?}", p); + let mut state_lock = state.lock()?; + let world = state_lock.world.as_mut().unwrap(); + + world.move_entity_with_delta(p.entity_id, &p.delta)?; } GamePacket::ClientboundMoveEntityPosRotPacket(p) => { let mut state_lock = state.lock()?; let world = state_lock.world.as_mut().unwrap(); - // world.move_entity( - // p.entity_id, - // EntityPos { - // x: p.x, - // y: p.y, - // z: p.z, - // }, - // )?; + world.move_entity_with_delta(p.entity_id, &p.delta)?; } GamePacket::ClientboundMoveEntityRotPacket(p) => { println!("Got move entity rot packet {:?}", p); |
