Skip to content

Find and pick the middle of the box in the area workshop - #151

Merged
tastybento merged 5 commits into
feature/spot-finderfrom
feature/workshop-spots
Nov 26, 2026
Merged

tastybento merged 5 commits into
feature/spot-finderfrom
feature/workshop-spots

Conversation

@tastybento

Copy link
Copy Markdown
Member

Stacked on #150. This is step 2 of the area workshop.

What it does

  • When the workshop overworld is made, Boxed searches the seed for good places to start, the same way /boxadmin areas find does.
  • The biome style is laid out around every place found, so each looks exactly as a box there will look. The place the workshop started at is always the first choice, and the others are kept far enough away that the layouts do not overlap.
  • Places are scored one at a time. Players in the workshop get a clickable chat message as each is ready ("3 prospective spawn points found").
  • /boxadmin areas spots shows the places as numbered buttons with coordinates and scores. The console gets a list.
  • Picking a place makes it the middle of every box, takes the player there, marks it with a diamond block only they see and shows the limit of the box with a world border only they see.
  • /boxadmin areas spots border hides or shows the border, because a border also stops the player flying out.
  • The search is saved after each place and carries on after a restart.

The land scoring moved from the find command into SpotScorer so both use the same code.

Testing

  • 16 new unit tests; 340 pass in total.
  • On a Paper 26.3 server, from the console: a full scan (first places in about 6 seconds, all 12 within 36), a restart with 5 of 12 scored that then finished, and a discard in the middle of a scan with no errors.
  • Not tested: the dialog, the chat click, the teleport, the diamond block and the border. They need a player.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HBXcjZkd22rGNW5ZyL1git

tastybento and others added 5 commits November 25, 2026 22:33
The workshop now looks through its seed for good places to start as soon
as its overworld is made. The biome style is laid out around every place
found and each is scored in turn; players in the workshop are told in
chat as each one is ready. The search is saved as it goes and carries on
after a restart.

/boxadmin areas spots shows the places as buttons (or a list for the
console). Picking one makes it the middle of every box, takes the player
there, marks it with a diamond block only they can see and shows the
limit of the box with a world border only they can see.

The land scoring moved out of the find command into SpotScorer so both
use the same code.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HBXcjZkd22rGNW5ZyL1git
BentoBox gives tab completion everything typed after the top command, so
the "areas" and "find" labels come before the parameters. The find, edit,
spots and rebuild commands counted from the wrong place: find offered
"random" where the area name goes, and rebuild never offered
"regenerate". They now count parameters from their own label.

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

Feedback from trying the workshop in game:

- Picking a place put the player on top of a tree. They are now put on
  the ground under the trees, beside the trunk if one is in the way, and
  the diamond block marks the ground.
- Chat filled with one line per place found. Chat is now used for the
  first place and the end of the search; progress in between is shown
  above the hotbar. The message for picking a place is one short line.
- The list of places could only be opened from chat. The swap hands key
  (F) now opens it anywhere in the workshop.
- The find command is console only. Players use the workshop.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HBXcjZkd22rGNW5ZyL1git
A box should start with a view of what can be reached. The spot finder
now leaves out places with mountain biomes within about 130 blocks, and
rates a place that is asked about by name lower if it has them.

Also tidies three test mocks that SonarCloud flagged.

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

Copy link
Copy Markdown

Base automatically changed from feature/area-workshop to feature/spot-finder November 26, 2026 18:35
@tastybento
tastybento merged commit 353c68c into feature/spot-finder Nov 26, 2026
3 checks passed
@tastybento
tastybento deleted the feature/workshop-spots branch November 26, 2026 18:35
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