Skip to content

Boxed II: world templates, areas and box cleanup - #145

Merged
tastybento merged 3 commits into
developfrom
feature/world-templates
Nov 25, 2026
Merged

tastybento merged 3 commits into
developfrom
feature/world-templates

Conversation

@tastybento

@tastybento tastybento commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Reworks how Boxed makes its world, and adds areas so a server can offer more than one kind of land.

Depends on BentoBoxWorld/BentoBox#3145. The build fails until that is merged and a 3.25.0 snapshot is published. Worlds made by earlier versions are not compatible.

World creation

  • The seed world is captured once into a template file per area and dimension, then unloaded. Later boots only open the file.
  • Blocks are read from disk on demand; only biomes are held in memory.
  • On the test machine the first boot takes about 30 seconds per area and later boots about 6 seconds, on a 2 GB heap. The README used to warn of 12 GB and 10 minutes.

Areas

  • areas.yml defines areas, each with its own seed, biomes file and structures file. An area owns one row of the box grid, and its blueprint bundle picks it.
  • A player has one box per area. An area can require another, unlocked at a box size set per area (unlocks-next-at, which may be 0).
  • Locked areas show in the picker but cannot be chosen. Closed or unbuilt areas are hidden.
  • A new box is put at the height that lands the starter blueprint's [spawn_here] sign on the area's ground.
  • /boxadmin areas lists, visits, creates, rebuilds and cleans areas.
  • /boxadmin place works anywhere in a box position and accepts ground and surface for y.

Boxes

  • A deleted box's position is restored from the template and then used again.
  • Advancements count towards the box the player is in. Those handed back by InvSwitcher when a player moves between boxes are ignored.
  • Unnamed boxes are listed by their area.

Helper addons

Known gaps

  • The nether starter blueprint is pasted at the overworld height, so in areas other than the default it only lines up if the nether ground happens to match.
  • A box whose centre is in the sea starts on the sea floor.
  • The cleaner does not put back natural animals, and leaves the old box's advancement and structure records behind.
  • Only en-US has the new locale keys.

Testing

  • 239 unit tests pass against a local build of the BentoBox branch.
  • Played on a Paper 26.3 test server with two areas: creating, chaining, resetting, deleting and reusing a position, moving between boxes, advancements in each, and the nether.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HBXcjZkd22rGNW5ZyL1git

tastybento and others added 3 commits November 24, 2026 17:40
World creation
- The seed world is captured once into a template file per area and
  dimension, then unloaded. Later boots only open the file. Blocks are read
  from disk on demand and only biomes are kept in memory, so the first boot
  takes about half a minute and the server no longer needs 12 GB.
- Biome providers list only the biomes they can produce, and the generator
  gives a fixed spawn, so the server does not search before generating.

Areas
- areas.yml defines areas, each with its own seed, biomes and structures.
  An area owns one row of the box grid and its blueprint bundle picks it.
- A player has one box per area. An area can require another, unlocked at a
  box size set per area. Locked areas show in the picker but cannot be
  chosen, and closed or unbuilt ones are hidden.
- A new box is put at the height that lands the starter blueprint's spawn
  sign on the area's ground.
- /boxadmin areas lists, visits, creates, rebuilds and cleans areas.
- /boxadmin place works anywhere in a box position and accepts ground and
  surface for y.

Boxes
- A deleted box's position is restored from the template and used again.
- Advancements count towards the box the player is in. Those handed back
  when a player moves between boxes are ignored, and a player with several
  boxes is brought in line with the box on arrival.
- Unnamed boxes are listed by their area.

Needs BentoBox 3.25.0 for the game mode hooks this uses. Worlds made by
earlier versions are not compatible.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HBXcjZkd22rGNW5ZyL1git
Boxed asks InvSwitcher for separate advancements, and for separate
advancements and inventory for each of a player's boxes, and asks Border to
return players who leave their box. Admins no longer have to set these up.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HBXcjZkd22rGNW5ZyL1git
- Close the template writer and thread pool on every path. A failed build
  could leave the temporary file open.
- Compare the contents of arrays held in records
- Read nullable values once before using them

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 acb21d0 into develop Nov 25, 2026
3 checks passed
@tastybento
tastybento deleted the feature/world-templates branch November 25, 2026 03:42
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