Improve multi-level support and stairs

This commit is contained in:
2026-09-27 07:52:48 -07:00
parent 30c31c185b
commit 917dac9c8e
7 changed files with 276 additions and 46 deletions

View File

@@ -60,7 +60,9 @@ Copy `.env.example` to `.env` and configure the Paper version/build and server p
`plugins/Metropolis/config.yml` controls plot dimensions and limits, floor and support generation, signs, road width/level/material/clearance, spawn behavior, wall generation, world name, and per-player overrides. The per-level stack is configured with `plot.sizeY` and `plot.maxLevels`: `sizeY` is the full height of one plot level, and `maxLevels` is the number of stacked levels that can be allocated without exceeding the world build height. `plot.multiplier` sets the default plot-size multiplier; `plot.maxPerPlayer` sets the default home limit; `plot.initial` sets how many homes are auto-generated on join, and `0` requires `/metropolis-home-acquire` for the player's first home.
Enable `road.avenues.stairs.generate` to add a centered stair run as part of the upper-level road. Set `material`, `width`, and `everyNBlocks`; the stair width must be narrower than `road.avenues.width`. The lower road is left unchanged and provides the normal-material landing; stairs begin one block above and forward from it. Connected following treads use upside-down stairs facing back down the run as backing, and the final tread reaches the upper road Y. The first implementation ascends along positive Z on the east-side avenue and leaves the three blocks before the top tread open in the upper road, only across the stair width.
Enable `road.avenues.stairs.generate` to add centered stair runs as part of upper-level roads. Set `material`, `width`, and `everyNBlocks`; the stair width must be narrower than `road.avenues.width`. Runs are centered within each eligible logical plot-sized avenue segment on both bordering avenues. For a 2-plot-long home, `everyNBlocks: 1` creates two runs on each border avenue. The lower road remains the normal-material landing; stairs begin one block above and forward from it. Connected following treads use upside-down stairs facing back down the run as backing, and the final tread reaches the upper road Y. The implementation ascends along positive Z and leaves the three blocks before each top tread open only across the stair width.
Upper-level plots require complete generated support below: every logical plot cell in their footprint must be occupied by a generated home or spawn at every lower level. If a footprint has gaps below, allocation skips that upper candidate and keeps searching for a supported lower-level location.
The breaking multi-level schema is documented in the example config at `src/main/resources/examples/multi-level.yml`. It uses split road sections (`road.streets.*` and `road.avenues.*`), a level-aware `plot.maxLevels` field, and the valid stair material `COBBLESTONE_STAIRS`.