From b0dc44caab2ff80a357a68f180ee217a3aadc14b Mon Sep 17 00:00:00 2001 From: WenXin2 Date: Thu, 23 Jan 2025 22:36:52 -0600 Subject: [PATCH] Add htibox rendering --- .../client/renderers/entities/PiranhaPlantRenderer.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/wenxin2/marioverse/client/renderers/entities/PiranhaPlantRenderer.java b/src/main/java/com/wenxin2/marioverse/client/renderers/entities/PiranhaPlantRenderer.java index 3a4525e..3b99a42 100644 --- a/src/main/java/com/wenxin2/marioverse/client/renderers/entities/PiranhaPlantRenderer.java +++ b/src/main/java/com/wenxin2/marioverse/client/renderers/entities/PiranhaPlantRenderer.java @@ -65,12 +65,13 @@ protected void applyRotations(PiranhaPlantEntity animatable, PoseStack poseStack } private static void renderHitboxes(PoseStack poseStack, VertexConsumer vertexConsumer, PiranhaPlantEntity entity) { - AABB customBoundingBox = entity.makeBoundingBox(); - AABB relativeBox = customBoundingBox.move(-entity.getX(), -entity.getY(), -entity.getZ()); - AABB relativeBoxInflate = customBoundingBox.move(-entity.getX(), -entity.getY(), -entity.getZ()).inflate(0.01); + AABB mainBoundingBox = entity.makeBoundingBox(); + AABB headBoundingBox = entity.head.makeBoundingBox(); + AABB relativeBox = mainBoundingBox.move(-entity.getX(), -entity.getY(), -entity.getZ()); + AABB relativeBoxInflate = mainBoundingBox.move(-entity.getX(), -entity.getY(), -entity.getZ()).inflate(0.01); if (entity.isMultipartEntity()) { - AABB piranhaPart = customBoundingBox.move(-entity.head.getX(), -entity.head.getY(), -entity.head.getZ()); + AABB piranhaPart = headBoundingBox.move(-entity.head.getX(), -entity.head.getY(), -entity.head.getZ()); poseStack.pushPose(); LevelRenderer.renderLineBox(poseStack, vertexConsumer, piranhaPart, 0.25F, 1.0F, 0.0F, 1.0F);