diff --git a/pumpkin/src/entity/mod.rs b/pumpkin/src/entity/mod.rs index 72e548116..eafcc169a 100644 --- a/pumpkin/src/entity/mod.rs +++ b/pumpkin/src/entity/mod.rs @@ -2025,15 +2025,22 @@ impl Entity { pitch: Option, _world: Arc, ) { - // TODO: handle world change + // Update server-side position and bounding box + self.set_pos(position); + if let Some(yaw) = yaw { + self.yaw.store(yaw); + } + if let Some(pitch) = pitch { + self.set_pitch(pitch); + } self.world .load() .broadcast_packet_all(&CEntityPositionSync::new( self.entity_id.into(), position, Vector3::new(0.0, 0.0, 0.0), - yaw.unwrap_or(0.0), - pitch.unwrap_or(0.0), + yaw.unwrap_or(self.yaw.load()), + pitch.unwrap_or(self.pitch.load()), self.on_ground.load(Ordering::SeqCst), )) .await;