Pre-generation
Pre-generation creates chunks ahead of time so they’re ready on disk before players arrive. This is useful for map rendering, reducing lag during exploration, or preparing event areas.
Config-based Pre-generation
Section titled “Config-based Pre-generation”Set a pregenerateRegion in the world config to automatically generate chunks on world load using /world settings:
/world settings pregenerate set -2500 -2500 2500 2500The arguments are block coordinates: min x, min z, max x, max z. The example above creates a 5000×5000 block region centered at the origin (-2500 to +2500 on each axis). The server generates all chunks within this region when the world loads.
The region is stored in config.json under chunkConfig.pregenerateRegion:
{ "chunkConfig": { "pregenerateRegion": { "min": { "x": -2500.0, "y": -2500.0 }, "max": { "x": 2500.0, "y": 2500.0 } } }}To clear the region:
/world settings pregenerate resetChunk saving
Section titled “Chunk saving”Pre-generated chunks enter the normal chunk lifecycle and are saved to disk automatically. You can force an immediate flush with:
/world save --confirm --allBenchmark Command
Section titled “Benchmark Command”/worldgen benchmark also generates chunks in a region, but it’s designed for performance measurement, not pre-generation:
/worldgen benchmark -2500 -2500 2500 2500Keep-loaded Region
Section titled “Keep-loaded Region”Separate from pre-generation, you can define a region that stays loaded in memory:
/world settings keeploaded set -500 -500 500 500This keeps chunks loaded even when no players are nearby, which is useful for always-active areas (spawn, arenas). Chunks in this region are also generated if they don’t exist.
Related
Section titled “Related”- Chunks — chunk loading, generation flags, and indexing
- Chunk Saving — how chunks are persisted to disk
- Storage Format — world directory structure and config