From 0f0d3b63d683072ce169fb9f8e25afc2fc640f2e Mon Sep 17 00:00:00 2001 From: QiuHu <74653499+2982136527@users.noreply.github.com> Date: Sat, 29 Aug 2026 13:39:32 +0800 Subject: [PATCH] fix(entity): use 0.8x width for suffocation box to match vanilla (#2930) --- crates/pumpkin/src/entity/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/pumpkin/src/entity/mod.rs b/crates/pumpkin/src/entity/mod.rs index 5ab965efe..672b15584 100644 --- a/crates/pumpkin/src/entity/mod.rs +++ b/crates/pumpkin/src/entity/mod.rs @@ -1592,7 +1592,14 @@ impl Entity { let max = aabb.max_block_pos(); let eye_height = self.get_eye_height(); + let eye_width = f64::from(self.width()) * 0.8; let mut eye_level_box = aabb; + let shrink_x = (aabb.max.x - aabb.min.x - eye_width) / 2.0; + let shrink_z = (aabb.max.z - aabb.min.z - eye_width) / 2.0; + eye_level_box.min.x += shrink_x; + eye_level_box.max.x -= shrink_x; + eye_level_box.min.z += shrink_z; + eye_level_box.max.z -= shrink_z; eye_level_box.min.y += eye_height; eye_level_box.max.y = eye_level_box.min.y;