Skip to content

Commit

Permalink
Fixed sneaking
Browse files Browse the repository at this point in the history
  • Loading branch information
Alvsch committed Dec 1, 2024
1 parent 51de1cf commit 364aa3e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pumpkin/src/entity/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,11 @@ impl Entity {
self.sneaking
.store(sneaking, std::sync::atomic::Ordering::Relaxed);
self.set_flag(Flag::Sneaking, sneaking).await;
// if sneaking {
// self.set_pose(EntityPose::Crouching).await;
// } else {
// self.set_pose(EntityPose::Standing).await;
// }
if sneaking {
self.set_pose(EntityPose::Crouching).await;
} else {
self.set_pose(EntityPose::Standing).await;
}
}

pub async fn set_sprinting(&self, sprinting: bool) {
Expand Down Expand Up @@ -218,7 +218,7 @@ impl Entity {
let pose = pose as i32;
let packet = CSetEntityMetadata::<VarInt>::new(
self.entity_id.into(),
Metadata::new(6, 20.into(), (pose).into()),
Metadata::new(6, 21.into(), pose.into()),
);
self.world.broadcast_packet_all(&packet).await;
}
Expand Down

0 comments on commit 364aa3e

Please sign in to comment.