Skip to content

Add a reachability check for areas - #147

Merged
tastybento merged 3 commits into
developfrom
feature/reachability
Nov 26, 2026
Merged

tastybento merged 3 commits into
developfrom
feature/reachability

Conversation

@tastybento

@tastybento tastybento commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Adds /boxadmin areas check <area>, which answers whether a player in an area can actually grow their box.

What it does

  • Survey: counts what a box of each size holds, from the area's templates (blocks, biomes, mobs captured with the land), the starter blueprint and the area's structures file.
  • Simulation: starts from a new box, earns every advancement whose needs are inside the box, grows the box by their scores, and repeats until nothing more can be earned.
  • Report: one summary line in chat and the console, and the detail in areas/<area>/reachability.txt: what was earned each round, what was out of reach and at what size the missing thing first appears, what is impossible and why, and the size at which each biome, mob and structure first appears.

The survey runs off the main thread and takes about half a minute for a 640-block land.

The requirements model

What each advancement needs is in a new requirements.yml, written by hand. It lists the raw resources an advancement comes down to, not every crafting step, and some entries are simplified. It also has rules for which biomes and structures bring which mobs, since mobs cannot be read from the land. Admins can correct it. A test checks that every advancement with a score in advancements.yml has an entry.

What it found on the default area

Run against the default seed with the shipped structures file:

  • The box grows to fill its land (size 320), earning 66 advancements for 376 points.
  • 31 scored advancements, worth 169 points, cannot be earned. Most need the End, which Boxed does not have. Others need things the land lacks: a nether fortress in the structures file (blaze rods, and with them brewing, the wither and beacons), a meadow, powder snow, goats, allays, and most of the biomes for Adventuring Time.

These are findings about the model as much as the land, so they need checking in-game before changing any scores.

Testing

  • 10 new unit tests for the survey, the requirements file and the simulator; 249 pass in all.
  • Ran the command on a Paper 26.3 server against two areas.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HBXcjZkd22rGNW5ZyL1git

tastybento and others added 3 commits November 24, 2026 20:16
/boxadmin areas check <area> plays out how a box grows in an area. It
surveys the area's land, starter blueprint and structures for what a box
of each size holds, then earns every advancement whose needs are in the
box, grows the box by their scores and repeats. It reports where the box
stops growing, what was out of reach and what can never be earned, and
writes the detail to areas/<area>/reachability.txt.

What each advancement needs is modelled by hand in requirements.yml,
which admins can correct. Every scored advancement has an entry.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HBXcjZkd22rGNW5ZyL1git
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HBXcjZkd22rGNW5ZyL1git
@sonarqubecloud

Copy link
Copy Markdown

@tastybento
tastybento merged commit 9820f0d into develop Nov 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant