Add a Hitboxes mod with per-entity toggles and colors - #26
Conversation
Render entity collision boxes independently of F3+B, with separate show/color settings for players, self, arrows, projectiles, items, hostile mobs, passive mobs, and other entities. Co-authored-by: Dominic Seung <dominic@seung.dev>
The three new Hitboxes files carried a single DSNS copyright line with the fork wording, matching none of the configured header rules: HEADER_NEW rejected "part of DolphinClient, a fork of AxolotlClient", while HEADER_FORK and HEADER expect a second copyright line. These are original files, so use HEADER_NEW verbatim. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmYtYPapkLEw3N96pZf7Pv
The @WrapOperation on Entity.isInvisible used field-target syntax for a
method target ("isInvisible:()Z"), which is how javap prints a constant
pool entry but not what Mixin's @at accepts. Mixin rejected it with
"Invalid name: isInvisible:", EntityRenderDispatcher failed to transform,
and the client died before reaching the main menu.
Drop the colon so the target parses as a method. The colon is still
correct on the renderHitboxes FIELD target directly above.
Verified by running the 1.8.9 client: it now boots with no mixin errors,
the Hitboxes category renders under Rendering, and hitboxes draw in world
with the per-type colours (self cyan, passive green, hostile dark red,
items yellow) plus the eye-height and look-vector lines.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XmYtYPapkLEw3N96pZf7Pv
Four panels from a real 1.8.9 client run: the Hitboxes config section (global options and the per-type Show/Colour groups) and the hitboxes rendering in world with the per-type colours. This is a PR attachment rather than shipped content -- drop it before merge if the repo would rather not carry screenshots. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmYtYPapkLEw3N96pZf7Pv
Fixed: the mod crashed the game on startupThe Hitboxes module never ran — the client died before the main menu, so nothing in this PR could work.
target = "Lnet/minecraft/entity/Entity;isInvisible:()Z" // note the colonThat colon is how Fix is dropping the colon (466a72b). The colon is still correct on the CI never surfaced this because the build failed at Verified by actually running itBooted the 1.8.9 client (Xvfb + Mesa llvmpipe): no mixin errors, module loads, config renders, hitboxes draw. Top row — the config section under Mods → Rendering → Hitboxes: line width, look vector, eye-height line, invisible entities, then the per-type Show + Colour groups (Self cyan, Players white). Bottom row — hitboxes rendering in world. Sampling the framebuffer confirms the per-type colours are actually distinct and correctly assigned:
Classification is correct including the case that first looked wrong to me: animals that died on a fall were drawn yellow because they had become dropped-item entities, which is the intended
Two notes, neither blocking
The screenshot is committed at Generated by Claude Code |
|
The image link in my previous comment was wrong — I used an incorrect commit SHA, so it 404s. Correct one: Top row — the config under Mods → Rendering → Hitboxes: line width, look vector, eye-height line, invisible entities, then the per-type Show + Colour groups (Self cyan, Players white). Bottom row — hitboxes rendering in world after the mixin fix: cyan self box, green cow/pig, dark-red spider/creeper, red eye-height line, blue look vector. Everything else in that comment stands. Generated by Claude Code |
Hitboxes was nested under the rendering category, which put it inside the Rendering tile on the Mods tab. That also hid its master enable: the menu catalog filters out options named "enabled" and only re-surfaces them as a tile-level toggle, so a category rendered as a nested section loses its switch entirely. The module could only be turned on by binding the unbound keybind or editing the config by hand. Register the category at the config root and route it to the HUD tab, the same way "general" is routed to Settings. Tiles on the HUD tab now keep their children as sections rather than promoting each one, otherwise the eight per-entity groups would each become a separate tile. Hitboxes is now its own HUD tile with a working enable toggle, and the per-type Show/Colour groups render inside it as sections. Note this moves the saved options from rendering.hitboxes to a top-level hitboxes block, so existing values reset to defaults. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmYtYPapkLEw3N96pZf7Pv
Moved Hitboxes from Rendering to the HUD tab (707cee0)This also fixes the missing master enable I flagged earlier — same root cause.
Two changes:
Note the HUD tab couldn't host it directly: it's built from Verified on a real client run: Hitboxes is its own HUD tile with a working toggle, the per-type Show/Colour groups render inside it as sections, and enabling it purely through the UI (no config editing) draws the hitboxes — self cyan, passive green, hostile dark red, plus eye-height and look-vector lines.
The PR description still says the module lands "in the Mods tab" — that's now the HUD tab. I left the description alone rather than editing your text. Generated by Claude Code |



Adds a Hitboxes module to the Mods tab so collision boxes can be shown without F3+B, with independent visibility and color for each entity group.
Settings
Vanilla F3+B hitboxes are left alone when the module is off.
Usage
Open the client menu with Right Shift, enable Hitboxes under Mods, then toggle types and pick colors.