From 364aa3effe208162b0399e0a72151690dff8b81d Mon Sep 17 00:00:00 2001 From: Alvsch <94403567+Alvsch@users.noreply.github.com> Date: Sun, 1 Dec 2024 20:31:21 +0100 Subject: [PATCH] Fixed sneaking --- pumpkin/src/entity/mod.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pumpkin/src/entity/mod.rs b/pumpkin/src/entity/mod.rs index a175586d0..1f55ec91c 100644 --- a/pumpkin/src/entity/mod.rs +++ b/pumpkin/src/entity/mod.rs @@ -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) { @@ -218,7 +218,7 @@ impl Entity { let pose = pose as i32; let packet = CSetEntityMetadata::::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; }