Repository navigation
2.0.07: choose a clear, level build plot when the survival campaign starts - #21
Merged
Merged
Conversation
The campaign always built with its corner two blocks east of the start, so starting on rough ground meant walls into a hill or a tree and a pause at the first blocked placement, long after the start (item D3 of the major plan). In a new world, startSurvival now asks GrindPlot (pure, unit tested) for the nearest plot within 16 blocks that fits every building the tier will put up: SurvivalBlueprint.footprint covers the houses, the diamond walkway, the max portal frame and the whole enchanting area, gap included. A plot fits when nothing a build cannot replace stands at or above the floor in the scan window, the ground is solid rather than a fluid, at most two blocks low anywhere, and level under at least 80% of the floor. The old corner is tried first, so starting on open level ground builds exactly where it always did. Terrain comes from a LoadedTerrain that reads each column's top non-replaceable block once, from loaded chunks only; the game tests measured 1 to 10 ms per search, 1,304 columns at worst. When nothing fits, the campaign starts paused with a "No clear, level spot" reason. .grind resume accepts the old corner; a restart in the same world searches again, without forgetting registered storage. Structure offsets and the enchanting layout moved into SurvivalBlueprint so the footprint and the tasks share one definition. SurvivalTasksGameTest builds a stone arena with a two-high pillar on every third column: the campaign must pause with the reason, then pick a corner on a clean patch opened east of the start. The pressure-storage scenario resumes past the new pause, since the MAX buildings may not fit its cleared area. 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 D3 of the 2.1.00 major plan.
Problem. The survival campaign always put its base corner two blocks east of the start. On rough ground that meant building walls into a hill or a tree, and the campaign only paused at the first blocked placement, long after it started.
Behaviour
startSurvivalasksGrindPlot(pure, unit tested) for the nearest plot within 16 blocks that fits every building the tier will put up.SurvivalBlueprint.footprint(tier)covers the houses, the diamond walkway, the max portal frame, and the whole enchanting area including the gap between table and shelves..grind resumeaccepts the old corner.LoadedTerrainreads each column's top non-replaceable block once, from loaded chunks only. In the game tests a search took 1–10 ms; the worst case read 1,304 columns and found nothing.PORTAL_X,ENCHANTING_X/Z) and the enchanting layout moved intoSurvivalBlueprint, so the footprint and the tasks share one definition.Tests
GrindPlotTest(9 unit tests):SurvivalTasksGameTest: builds a stone arena with a two-high pillar on every third column. The campaign must first pause with the reason. Once a clean patch is opened east of the start, it must pick a corner on that patch at floor level.resume()after starting. That covers the case where the MAX buildings don't fit its arena. The call is a no-op when a plot is found, which is what happens in the flat test world.Validation (local, Java 25 + Xvfb)
./gradlew build: 941 tests, 0 failures.tools/smoke-client.shpassed, including every AutoGrind scenario.tools/test-baritone.shpassed against real Baritone 26.2.Release
mod_version=2.0.07, with aCHANGELOG.mdsection.🤖 Generated with Claude Code
https://claude.ai/code/session_01TGuJsde5s6BFqgC63uNGrh
Generated by Claude Code