Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
b89003e
Add a finder for good places to start a box
tastybento Nov 25, 2026
7be5182
Fix the issues SonarCloud raised on the spot finder
tastybento Nov 25, 2026
da1fea5
Make the Nether fortress work in boxes
tastybento Nov 25, 2026
96e342a
Fix the code smells SonarCloud raised on the fortress work
tastybento Nov 25, 2026
ddff2df
Add biome styles and the first part of the area workshop
tastybento Nov 25, 2026
0929fb2
Fix the code smells SonarCloud raised on the area workshop
tastybento Nov 25, 2026
447ce1b
Find and pick the middle of the box in the area workshop
tastybento Nov 26, 2026
9189d10
Fix the code smells SonarCloud raised on the workshop spots
tastybento Nov 26, 2026
1938827
Fix tab completion of the area commands
tastybento Nov 26, 2026
f04e466
Stand admins on the ground, quieten the workshop chat and add a key f…
tastybento Nov 26, 2026
a1e6d2b
Keep starting places clear of mountains
tastybento Nov 26, 2026
daa0ddb
Make the workshop into an area without a restart
tastybento Nov 26, 2026
6320b60
Fix the code smells SonarCloud raised on making an area
tastybento Nov 26, 2026
7a3c3fe
Make it plain that the area name box never starts as null
tastybento Nov 26, 2026
a5399b6
Merge pull request #149 from BentoBoxWorld/feature/nether-fortress
tastybento Nov 26, 2026
5173a1b
Merge pull request #150 from BentoBoxWorld/feature/area-workshop
tastybento Nov 26, 2026
353c68c
Merge pull request #151 from BentoBoxWorld/feature/workshop-spots
tastybento Nov 26, 2026
a922e6f
Merge pull request #152 from BentoBoxWorld/feature/workshop-make
tastybento Nov 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,18 @@ 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 <area>` 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 <area> [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 `<worldname>/finder_<time>` world, using the area's biomes file laid out around every spot at once (`AbstractSeedBiomeProvider.setCentres`), and scored by `reach/SpotSurvey` (dry middle, then the box size that takes in logs, surface water, shallow stone, iron ore and coal). The world is unloaded without saving and deleted. An area uses a spot through `centre: x,z` in `areas.yml` (`Area.centreX/centreZ`) and `nether-centre: x,z` for the Nether. Fortresses have no structure templates, so they can only come from the land: after the overworld, the command locates the nearest fortresses in a throwaway Nether, generates each and uses `reach/FortressSpot` to suggest a `nether-centre` on open ground just clear of a blaze spawner.

`listeners/FortressMobsListener` makes a copied fortress work: natural spawns on nether bricks in the game Nether are swapped for wither skeletons, blazes and skeletons at vanilla fortress weights (`world.nether.fortress-mobs`). `LandSurvey` records spawners as the mob they make, and `requirements.yml` treats nether bricks as the fortress.

### Biome styles and the area workshop

`generators/biomes/BiomeLayout` reads one dimension of a biomes file and answers "which chosen biome is at dx,dz from the middle" (null = the seed's own). It supports per-quarter lists, `rings`, random `patches`, and `blend` (noise that bends the edges). `AbstractSeedBiomeProvider` only adds the centres and the vanilla fallback. `biomes.yml` is the "original" style; `biomes/*.yml` are the others (`workshop/BiomeStyles` maps names to files). With `blend: 0` the original layout must stay exactly as it was, because existing areas depend on it.

`workshop/WorkshopManager` runs the one workshop: temporary worlds `<worldname>/workshop` and `/workshop_nether` (folders inside the game world's folder, like seed worlds) made with the seed generator, peaceful, spawn limits 0. Its state (`workshop/Workshop`: seed, biomes file, source area, centres, the players inside and the game mode each had outside) is saved to `areas/workshop.yml` on every change and reloaded, with the worlds, in `onEnable`. `listeners/WorkshopListener` forces creative on entry, restores the game mode on exit, respawns in place, and sends players home if the workshop was discarded while they were offline (`areas/displaced.yml`). `/boxadmin areas edit` (`AdminAreasEditCommand`) holds the logic and can be typed; `WorkshopDialogs` is only the Paper dialog UI on top, and cannot be unit tested under MockBukkit. When the workshop overworld is made, `WorkshopManager.scan` searches the vanilla biomes (`reach/SpotFinder`), stores the candidates as unscored `Workshop.Spot`s, calls `setCentres` with all of them (spot 0 is always the starting centre; the others are kept `4 * area radius` from it so layouts do not overlap) and scores them one at a time with `reach/SpotScorer` (shared with the find command). The spot list is saved after each score and the scan resumes after a restart; the centres must be set again before the world is created or new chunks would get the wrong biomes. `/boxadmin areas spots` (`AdminAreasSpotsCommand`) lists them and `select` sets `Workshop.setCentre`, teleports, and `showCentre` sends a fake diamond block and a per-player `WorldBorder`. `/boxadmin areas make` (`AdminAreasMakeCommand`, `workshop/AreaMaker`) turns the workshop into a live area in two parts. `prepare` copies each dimension with `TemplateBuilder.buildAsync` (one column of chunks per callback, so the server keeps ticking; the blocking `build` is only for startup) into `areas/workshop-build/` and runs `reach/AreaCheck` on the result. `finish` writes `areas.yml`, calls `AreaManager.put` (new row, or the same row when replacing an area that has no boxes), moves the files into `areas/<id>/`, `Boxed.setLand`, `registerSeedGenerators`, makes the blueprint bundle, queues `BoxCleaner.clean` for the row when land was replaced, and `WorkshopManager.keepAs` unloads the workshop worlds with a save and renames their folders to the area's seed worlds. Nothing here may need a restart. Still to build: structure logging, then the Nether and End spots.

### Deleted boxes

`listeners/BoxCleaner` restores a deleted (soft-deleted, `isDeletable()`) box's whole position from the template — generated chunks only, both dimensions, within a 10 ms per tick budget — then removes the island record so `AreaLocationStrategy` can hand the position out again (it always takes the first position in the row with no record). Do not rely on BentoBox's region-file purge for Boxed: it only deletes a region when every position overlapping it is deletable, and 640-block positions always share 512-block regions with neighbours. Deleted boxes are re-queued from the island cache on `BentoBoxReadyEvent`, so no extra persistence is needed.
Expand Down
Loading
Loading