Render-Hooked Hitbox Expander

Hitbox_Render_Mixin Hitbox HIGH +9 score

🎮 Minecraft Gameplay Impact

Hooks WorldRenderer.renderEntity() via @Inject right before rendering frames to overwrite entity bounding boxes, ensuring hitboxes stay inflated every single frame without interfering with server tick synchronization.

🔍 Functions & APIs Analyzed

WorldRenderer.renderEntity

Render method (method_22977) invoked for every entity in view frustum.

Entity.setBoundingBox

Modifies collision box inside rendering lifecycle.

💻 Mod Implementation (Dev Source / Mapped)

// Developer Source (Fabric / Yarn mappings)
@Mixin(WorldRenderer.class)
public class RenderMixin {
    @Inject(at = @At("HEAD"), method = "renderEntity", cancellable = true)
    private void renderEntity(Entity entity, double tf, double tf1, double tf2, float tf3, MatrixStack matrixStack,
                              VertexConsumerProvider vertexConsumerProvider, CallbackInfo ci) {
        if (entity instanceof PlayerEntity && entity != MinecraftClient.getInstance().player) {
            float size = 0.5f;
            entity.setBoundingBox(new Box(
                entity.getX() - size, entity.getBoundingBox().minY, entity.getZ() - size,
                entity.getX() + size, entity.getBoundingBox().maxY, entity.getZ() + size
            ));
        }
    }
}

⚙️ Decompiled Representation (Vineflower View)

// Decompiled with Vineflower 1.12 (Intermediary mappings)
@Mixin({class_761.class})
public class RenderMixin {
    @Inject(at = @At("HEAD"), method = "method_22977", cancellable = true)
    private void renderEntity(class_1297 entity, double tf, double tf1, double tf2, float tf3, class_4587 matrixStack,
                              class_4597 vertexConsumerProvider, CallbackInfo ci) {
        if (entity instanceof class_1657 && entity != class_310.method_1551().field_1724) {
            float size = 0.5F;
            entity.method_5857(new class_238(
                entity.method_23317() - (double)size, entity.method_5829().field_1322, entity.method_23321() - (double)size,
                entity.method_23317() + (double)size, entity.method_5829().field_1325, entity.method_23321() + (double)size
            ));
        }
    }
}

🛡️ Bytecode Signature & Static Detection

Matches Entity.setBoundingBox invocations enclosed within Mixin methods targeting renderEntity (method_22977).