diff options
Diffstat (limited to 'azalea-client/src')
| -rw-r--r-- | azalea-client/src/client.rs | 12 | ||||
| -rw-r--r-- | azalea-client/src/movement.rs | 5 |
2 files changed, 4 insertions, 13 deletions
diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs index f3229e76..cca932c0 100644 --- a/azalea-client/src/client.rs +++ b/azalea-client/src/client.rs @@ -1,6 +1,5 @@ use crate::{movement::MoveDirection, Account, Player}; use azalea_auth::game_profile::GameProfile; -use azalea_block::BlockState; use azalea_chat::component::Component; use azalea_core::{ChunkPos, ResourceLocation, Vec3}; use azalea_protocol::{ @@ -618,17 +617,8 @@ impl Client { } ClientboundGamePacket::BlockUpdate(p) => { debug!("Got block update packet {:?}", p); - // TODO: update world let mut dimension = client.dimension.lock()?; - // dimension.get_block_state(pos) - if let Ok(block_state) = BlockState::try_from(p.block_state) { - dimension.set_block_state(&p.pos, block_state); - } else { - warn!( - "Non-existent block state for block update packet {:?}", - p.block_state - ); - } + dimension.set_block_state(&p.pos, p.block_state); } ClientboundGamePacket::Animate(p) => { debug!("Got animate packet {:?}", p); diff --git a/azalea-client/src/movement.rs b/azalea-client/src/movement.rs index 0a4a05e8..193f2017 100644 --- a/azalea-client/src/movement.rs +++ b/azalea-client/src/movement.rs @@ -180,7 +180,8 @@ impl Client { let mut forward_impulse: f32 = 0.; let mut left_impulse: f32 = 0.; - match physics_state.move_direction { + let move_direction = physics_state.move_direction; + match move_direction { MoveDirection::Forward | MoveDirection::ForwardRight | MoveDirection::ForwardLeft => { forward_impulse += 1.; } @@ -191,7 +192,7 @@ impl Client { } _ => {} }; - match physics_state.move_direction { + match move_direction { MoveDirection::Right | MoveDirection::ForwardRight | MoveDirection::BackwardRight => { left_impulse += 1.; } |
