Repository navigation
2.0.03: split the world overlay renderer by overlay family - #17
Merged
Merged
Conversation
WorldOverlayRenderer held every overlay in one 780-line class, chosen by an instanceof chain over thirteen module lookups. Each module's overlay is now a small WorldOverlay in ui/overlay: EntityOverlays (ESP, nametags, items, projectiles, tracers), BlockOverlays (storage, blocks, spawns, holes) and PathOverlays (trajectories, breadcrumbs, waypoints, the Freecam body), with the line and colour primitives in OverlayDraw. WorldOverlays drives labels and lines from one ordered list, so adding an overlay is one class and one list entry. The forty moved members were compared against the original and are unchanged apart from visibility and qualified names. Draw order, the per-module render guard, the stale-level check and the shared frustum are the same; WorldOverlaysTest pins the order and ViewCullingTest now scans the whole package. Release as 2.0.03. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TGuJsde5s6BFqgC63uNGrh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Item C1 of the 2.1.00 major plan. This is an architecture-only change and draws exactly what it drew before.
Before,
ui/WorldOverlayRendererheld every world overlay in one 780-line class and picked them through aninstanceofchain over thirteen module lookups.New structure (
ui/overlay)WorldOverlay<M>— one per module, with three hooks:active— whether to draw this frame (Freecam's body marker overrides it)submitLabels— name-tag labels, submitted while the frame is collecteddrawLines— geometry written into the shared lines bufferEntityOverlays: ESP, Nametags, ItemESP, ProjectileESP, TracersBlockOverlays: StorageESP, BlockESP, SpawnESP, HoleESPPathOverlays: Trajectories, Breadcrumbs, Waypoints, the Freecam body markerOverlayDraw— line, box, marker and colour primitives.WorldOverlays— the dispatcher. One ordered list drives labels, then lines. Adding an overlay is one class and one list entry.Why behaviour is unchanged
private→ package) and qualified names becoming imports.RenderServiceguardWorldOverlaysTestpins the label and line order.ViewCullingTestnow scans the whole package. It still checks that line overlays are never culled and that box overlays cull in world space.Validation (local, Java 25 + Xvfb)
./gradlew build: 917 tests, 0 failures.tools/smoke-client.shpassed onab6fd3f, including every render scenario's pixel measurement:rendered=301 entity units=301 ESP=256 Nametags=64.Release
mod_version=2.0.03, with aCHANGELOG.mdsection.🤖 Generated with Claude Code
https://claude.ai/code/session_01TGuJsde5s6BFqgC63uNGrh
Generated by Claude Code