Repository navigation
One query format for the finder, shared by the app and the CLI - #27
Merged
Merged
Conversation
Structure targets (a set in one dimension, optionally narrowed, with a stable id) move from the app's layer list into mc-core, so the finder, the map and the command line name structures the same way. The finder's Query gets a text form, `center=spawn villages:300:2 end_cities+ship:1000 biome=plains,meadow`, with FromStr and Display and errors that say what is wrong. The find example parses it (and so can now search Nether and End structures), and the app's finder panel shows it in a field that can be copied, pasted or edited, kept in sync with the form. A Match prints as one line, used by the CLI and by a new "copy all results" button. The biome at the center can now be several biomes in the app too; saved settings keep reading the older single biome. The CLI's output is unchanged on three searches compared with main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SenGxDDRwLejx8nir8GXKG
Merged
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.
Proposal #6 of the architecture review: the finder's query and its results had three hand-written front ends (the
findexample's argv parsing, the app panel, the tests). They now share one model in mc-core.What changes
structure::target): each searchable group of structures is a structure set in one dimension, optionally narrowed (fortresses and bastions share a set), and has a stable id. The app's layers take their set, dimension and narrowing from it by id, so the app and the core can no longer disagree.StructureFilteris now{ target, radius, min_count, ship_only }.Query(FromStr/Display):center=spawn villages:300:2 end_cities+ship:1000 biome=plains,meadow.Errors name the problem, for example an unknown structure (listing the valid ids), a bad radius, or
+shipon something without ships.Matchprints as one line: the CLI output and the app's new "copy all results" button use the same line.findexample: it parses the shared form. That means it can now search Nether and End structures and several biomes.--zeroand--biomebecomecenter=zeroandbiome=.biomesand keep writing and reading the old singlebiome.Verification
cargo fmt --all --check && cargo clippy --all-targets -- -D warnings && cargo testpass.findoutput matchesmain(sorted) on three searches: sequential with two filters,center=zerowith two biomes, and random seeds.onlymatches a structure);ship_onlyon a target without ships;Generated by Claude Code