From 3de29a47ea45d38ac46c6f8c8cfcfd044cd16283 Mon Sep 17 00:00:00 2001 From: NaySurGithub <96527285+NaySurGithub@users.noreply.github.com> Date: Fri, 6 Nov 2026 23:14:45 +0100 Subject: [PATCH] fix(entity): default an unsized actor's hitbox to 0.6 x 1.8, scaled An actor without server-sent BOUNDINGBOX_WIDTH/HEIGHT and without a known collision box fell back to an unscaled 0.6 x 1.0 box. Large scaled NPCs could then only be hit low on their body: aiming at the head sent no attack at all. The game's minecraft:collision_box description defaults to 0.6 x 1.8 (0x142EBA9A0); the box now uses that, times the actor's scale like the other cases. --- src/client/entity/EntityRenderer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/entity/EntityRenderer.cpp b/src/client/entity/EntityRenderer.cpp index dc36e2f..96a7381 100644 --- a/src/client/entity/EntityRenderer.cpp +++ b/src/client/entity/EntityRenderer.cpp @@ -283,7 +283,8 @@ namespace perlin::entity { float w, h; if (assets.CollisionBox(e.type, w, h)) return {w * scale, h * scale}; - return {0.6f, 1.0f}; + // no server box and no definition: minecraft:collision_box defaults to 0.6 x 1.8 (0x142EBA9A0) + return {0.6f * scale, 1.8f * scale}; } void EntityRenderer::ClearCaches() {