Repository navigation
2.0.05: split AutoGrind's travel, station and reach helpers; show overlay frame cost - #19
Merged
Merged
Conversation
After 2.0.04 the executor still mixed lifecycle and planning with three kinds of helper. They are now collaborators held in final fields: g.travel (GrindTravel: one Baritone goal at a time, the mining process AutoGrind owns, stall detection and the pause message), g.stations (GrindStations: the table and furnace a plan uses and the station menu AutoGrind opened) and g.reach (GrindReach: reach, line of sight, aiming and the bounded nearby-block lookup). The executor is down from 814 to 592 lines. The move used the same compiler-guided method as 2.0.04: members were cut out unchanged, callers were routed through the new field (g.moveNear -> g.travel.moveNear), and every unresolved executor reference in the moved code was prefixed from javac's own errors. The 32 moved members (210 lines) match the originals apart from that prefix; three private members the executor still reads became package-private, and a local in start() was renamed so it no longer shadows the new stations field. Release as 2.0.05. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TGuJsde5s6BFqgC63uNGrh
Module tick timings miss render work: an ESP's tick only publishes targets, and the boxes are written every frame. OverlayTimings is the frame-based counterpart, a ModuleTimings with a 120-frame window and a 180-frame expiry (ModuleTimings gains a constructor for both; the default is unchanged). WorldOverlays opens a frame each time it collects, which closes the previous one, and adds each overlay's labels and deferred lines into one slot, so a drawn overlay is one sample per frame. Measurement stays self-expiring: unless the widget asked within the last 180 frames, the only cost is opening the frame. ModuleTimingsHud lists the three costliest overlays under the module rows, at a fixed position so the heading does not jump while the module rows fill in. Timing lives in WorldOverlays rather than RenderService.guard because only the dispatcher knows which frame slot a call belongs to. Unit tests cover one sample per frame for two passes, dropping an overlay that stops drawing, expiry, the frame window and a late pass on a closed frame. The shared entity walk game test now also requires all five entity overlays to be measured over several frames with 300 stands in view, and ESP to cost more than nothing. 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
This covers the last overhaul step in the 2.1.00 major plan: the rest of item D1, then item C2. There are two commits.
1. Move AutoGrind's travel, station and reach helpers out of
GrindExecutor(no behaviour change)The executor's helpers are now three collaborators held in final fields:
g.travelGrindTravelmovementProblemg.stationsGrindStationsg.reachGrindReachGrindExecutorgoes from 814 to 592 lines.The move used the same compiler-guided method as 2.0.04:
g.moveNear→g.travel.moveNear.An automated comparison confirmed the 32 moved members (210 lines) match the originals apart from the
g.prefix. Two other edits were needed:start()was renamed so it no longer shadows the newstationsfield.2. Show each world overlay's frame cost in the Module Timings widget (C2)
OverlayTimings: the frame-based counterpart ofModuleTimings, with a 120-frame window and a 180-frame expiry.ModuleTimingsgains a constructor for both; its default is unchanged.WorldOverlaysopens a frame each time it collects, which also closes the previous one. Each overlay's labels and its deferred lines add into one slot, so an overlay is one sample per frame.ModuleTimingsHudlists the three costliest overlays under the module rows.WorldOverlaysrather thanRenderService.guard, because only the dispatcher knows which frame slot a call belongs to.Validation (local, Java 25 + Xvfb)
./gradlew build: 923 tests, 0 failures. The 6 new tests are inOverlayTimingsTest.tools/smoke-client.shpassed, including every AutoGrind scenario. The shared entity walk game test now also requires all five entity overlays to be measured over several frames, and ESP to cost more than nothing. With 300 armor stands in view it measured:The plan now names ESP's per-box cost as the next render target, ahead of the Trajectories rework.
tools/test-baritone.shpassed against real Baritone 26.2. It covered 384-block travel, remote mining, rebuilding a tool mid-goal, returning to an unloaded base, door and chest access, and replacement-goal ownership.Release
mod_version=2.0.05, with aCHANGELOG.mdsection.🤖 Generated with Claude Code
https://claude.ai/code/session_01TGuJsde5s6BFqgC63uNGrh
Generated by Claude Code