From b89003e734d676ad4e5b4c1e3137996b9b363ee9 Mon Sep 17 00:00:00 2001 From: tastybento Date: Tue, 24 Nov 2026 22:50:21 -0800 Subject: [PATCH 01/14] Add a finder for good places to start a box /boxadmin areas find [seed|random] [radius] searches the biomes of a seed for dry, wooded land near water, generates the land around the best places in a throwaway world and scores each for how soon a box there holds logs, water, stone, iron ore and coal. Areas can now take their land from anywhere in their seed with a new centre setting in areas.yml, so a place that is found can be used. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01HBXcjZkd22rGNW5ZyL1git --- CLAUDE.md | 4 + README.md | 24 +- src/main/java/world/bentobox/boxed/Boxed.java | 4 +- .../java/world/bentobox/boxed/areas/Area.java | 4 +- .../bentobox/boxed/areas/AreaManager.java | 25 +- .../boxed/commands/AdminAreasCommand.java | 1 + .../boxed/commands/AdminAreasFindCommand.java | 339 ++++++++++++++++++ .../biomes/AbstractSeedBiomeProvider.java | 61 +++- .../generators/biomes/SeedBiomeGenerator.java | 10 + .../bentobox/boxed/reach/SpotFinder.java | 184 ++++++++++ .../bentobox/boxed/reach/SpotSurvey.java | 174 +++++++++ src/main/resources/areas.yml | 11 +- src/main/resources/locales/en-US.yml | 11 + .../bentobox/boxed/areas/AreaManagerTest.java | 22 ++ .../bentobox/boxed/reach/SpotFinderTest.java | 92 +++++ .../bentobox/boxed/reach/SpotSurveyTest.java | 143 ++++++++ 16 files changed, 1090 insertions(+), 19 deletions(-) create mode 100644 src/main/java/world/bentobox/boxed/commands/AdminAreasFindCommand.java create mode 100644 src/main/java/world/bentobox/boxed/reach/SpotFinder.java create mode 100644 src/main/java/world/bentobox/boxed/reach/SpotSurvey.java create mode 100644 src/test/java/world/bentobox/boxed/reach/SpotFinderTest.java create mode 100644 src/test/java/world/bentobox/boxed/reach/SpotSurveyTest.java diff --git a/CLAUDE.md b/CLAUDE.md index 6c84a49..670bded 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -40,6 +40,10 @@ Never hold the whole region in memory or load the seed world on a normal boot `reach/` answers whether an area can be played. `LandSurvey` counts, per box size, the blocks, biomes and template entities of an area's templates plus the starter blueprint and the structures file. `Requirements` reads `requirements.yml`, a hand-written model of what each scored advancement needs (and `provides` rules that turn biomes and structures into mobs). `GrowthSimulator` earns everything in reach, grows the box by the scores and repeats; `ReachReport` writes it up. `/boxadmin areas check ` runs the survey off the main thread. Every advancement with a score in `advancements.yml` must have an entry in `requirements.yml` (a test enforces it). +### Finding a place to start + +`/boxadmin areas find [seed|random] [radius]` (`AdminAreasFindCommand`) looks for good spots in a seed. `reach/SpotFinder` searches the vanilla biomes (no chunks needed) for wooded land with water nearby; the best few are generated in a throwaway `/finder_