Tutorials
Configuring and managing your server

How to Pre-generate a World with ChunkPreGenerator

In this tutorial, you'll learn how to pre-generate a 20k block radius world using the ChunkPreGenerator mod, helping you optimize performance and prevent lag from generating new chunks during gameplay. This is particularly useful for servers but also works for singleplayer worlds.
 

Step 1: Download and Install ChunkPreGenerator

First, download the ChunkPreGenerator mod from curse.

Make sure you're using version 2.5.1. After downloading, place the .jar file in your mods folder. If you're running a server, place it in your server's mods folder.
 

Step 2: Pre-generate the World

To begin pre-generating the world, you'll need to run a few commands. These can be executed in-game for singleplayer or through the server console for multiplayer.

  1. Set the priority for the pregenerator:

    /pregen utils setPriority pregenerator
  2. Limit the amount of processing time the server spends on chunk generation per tick to avoid lag:

    /pregen timepertick 250
  3. Start the pre-generation process for a 20,000-block radius in a square shape around coordinates (0, 0):

    /pregen gen startradius square 0 0 b20000

This command generates a 20,000-block radius (a total diameter of 40,000 blocks), covering a large area for exploration without on-the-fly chunk generation.
 

Step 3: Optional Set a World Border

To prevent players from generating additional chunks beyond the pre-generated area, set a world border. This command sets the world border to a 40,000-block diameter (20,000 blocks in all directions from the center):

 
/worldborder set 40000
 

Step 4: Remove ChunkPreGenerator

Once the pre-generation process is complete, restart your server or game and remove the ChunkPreGenerator mod. This step is necessary to reduce unnecessary mods running during gameplay.
 

Step 5: Additional Commands (Optional)

If you'd like to pause pre-generation when players are online to avoid lag while still keeping your server active with constant pregen, use this command:

 
/pregen utils setPlayerLimit 1

This will pause pre-generation whenever there's at least one player online.

By following these steps, you'll have a pre-generated 20k radius world, helping improve server performance and reducing in-game lag from chunk generation.