Compatibility
Minecraft: Java Edition
Platforms
Tags
Creators
Details
PreGen — Async Chunk Pre-Generator for Paper 1.20.4
Tired of laggy player joins, stuttering exploration, and your server's CPU melting every time someone wanders into fresh terrain? PreGen generates your world before players ever step foot in it. Smooth joins. Buttery exploration. Zero pain.
Why PreGen?
Chunk generation is one of the most expensive things a Minecraft server does. Every time a player explores, the main thread grinds through terrain shaping, biome decoration, structure placement, and lighting. The result? TPS drops, join lag, and that "loading terrain..." screen that just won't go away.
PreGen fixes this — once and for all. Run it once. Walk away. Come back to a fully-built world your players can fly through at Mach 3.
Features at a glance
- Spiral generation — expands outward from spawn in clean concentric rings, so your most-visited areas are ready first.
- Asynchronous chunk loading — built on Paper's modern
getChunkAtAsyncAPI. No main-thread freezes. No stutter. - TPS-aware throttling — automatically slows down when your server is under load, then speeds back up the moment things calm down.
- Crash-proof progress — every job is saved to disk every few hundred chunks. Restart the server, crash the JVM, pull the power cord — PreGen picks up exactly where it left off.
- Per-world configuration — overworld, nether, end, your custom dimensions — set independent radii and centers for each.
- Memory friendly — chunks are unloaded the instant they're written to disk. No more 30 GB RAM spikes during pre-gen.
- Live progress reporting — chunks done, percentage, chunks/sec, and a real-time ETA, broadcast to all ops on a configurable interval.
- Zero dependencies — drop the jar in, you're done. No external libs, no companion plugins.
Commands
| Command | What it does |
|---|---|
/pregen start [world] [radiusBlocks] [centerX centerZ] |
Kick off a new job |
/pregen stop [world] |
Stop and save progress |
/pregen pause [world] |
Pause (resume later) |
/pregen resume [world] |
Resume a paused or saved job |
/pregen status [world] |
Live progress + ETA |
/pregen reset [world] |
Wipe saved progress for a world |
Aliases: /pg, /pregenerate
Permission: pregen.use (default: op)
Full tab-completion included.
Example usage
/pregen start → current world, config radius /pregen start world 10000 → 10k-block radius around configured center /pregen start world_nether 2000 0 0 → explicit center /pregen status → see every active + saved job at once /pregen pause world → take a break, resume whenever
Configuration
Everything in config.yml is tunable to your hardware:
parallel-chunks: 8 # max concurrent async chunk loads
chunks-per-tick: 4 # max submissions per server tick
min-tps: 17.0 # pause if TPS drops below this
save-every: 200 # write progress every N chunks
auto-resume-on-start: true # pick up after restarts automatically
broadcast-interval-seconds: 30
unload-after-generate: true # keep memory usage flat
worlds:
world: { radius: 10000, center-x: 0, center-z: 0 }
world_nether: { radius: 2000, center-x: 0, center-z: 0 }
world_the_end: { radius: 2000, center-x: 0, center-z: 0 }
Performance tip: crank parallel-chunks to 16 and chunks-per-tick to 8 on beefy hardware. The TPS gate will catch you if you go too far.
Tested on
PaperMC 1.20.4
Java 17+ (Java 21 recommended)
Install in 30 seconds
Drop PreGen-1.0.0.jar into your plugins/ folder
Start the server once to generate plugins/PreGen/config.yml
Tune the radius for each world (default is 10k blocks for the overworld)
Run /pregen start
Go grab a coffee. The world will be ready when you're back.
Why this over the alternatives?
Lightweight. ~20 KB jar. Five Java files. Read it in five minutes.
No external libraries. No Adventure shading, no Kotlin runtime, no nothing. Pure Paper API.
Honest defaults. It won't kill your TPS out of the box. Promise.
Truly resumable. Cursor state (current ring + index) is persisted, not just a chunk counter. Restarts pick up at exactly the right chunk.
Support
Found a bug? Have a feature request? Open an issue on GitHub.
If PreGen saved your server, leave a like — it really helps!
Happy pre-generating!

