Repository navigation
2.0.04: move AutoGrind's step classes out of GrindExecutor - #18
Merged
Merged
Conversation
GrindExecutor was 1,650 lines, half of it six inner task classes reaching into the executor implicitly. Gathering, moving an offhand ingredient, placing and opening a station, crafting and smelting are now top-level classes (GrindGatherTask, GrindOffhandTask, GrindPlaceStationTask, GrindOpenStationTask, GrindCraftTask, GrindSmeltTask). Each holds the executor as g and reaches shared state as g.x, the pattern SurvivalTasks already uses; the members they need are package-private. The executor is down to 814 lines. The move was driven by the compiler: classes were cut out unchanged, then every unresolved outer reference was prefixed and every inaccessible member opened from javac's own errors, so no name could bind to anything new. The 788 moved lines match the originals apart from those prefixes and constructor line breaks. Release as 2.0.04. 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 is the first step of item D1 in the 2.1.00 major plan. It is an architecture-only change, and AutoGrind behaves exactly as before.
GrindExecutorwas 1,650 lines. Half of that was six inner task classes that reached into the executor implicitly. Each is now a top-level class inservices:GrindGatherTaskGrindOffhandTaskGrindPlaceStationTaskGrindOpenStationTaskGrindCraftTaskGrindSmeltTaskEach class holds the executor as
gand reaches shared state throughg.x.SurvivalTasksalready uses this pattern. The members the classes need are now package-private. The executor is down to 814 lines.Why behaviour is unchanged
g.for instance members,GrindExecutor.for static ones).Validation (local, Java 25 + Xvfb)
./gradlew build: 917 tests, 0 failures.tools/smoke-client.shpassed on this tree, including every AutoGrind scenario.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.04, with aCHANGELOG.mdsection.🤖 Generated with Claude Code
https://claude.ai/code/session_01TGuJsde5s6BFqgC63uNGrh
Generated by Claude Code