The Best Resource for Minecraft
The Best Resource for Minecraft

World Pre Generator Mod Wiki

World Pre Generator is a high-performance utility mod designed to pre-generate Minecraft dimensions via commands, significantly reducing server-side lag and exploration stutters by preparing chunks before players arrive.

5 sections · 748 words

Overview#

World Pre Generator is a server-side utility mod (which can also be used in single-player) that allows administrators to pre-generate chunks in any dimension. By generating terrain, structures, and lighting in advance, the mod eliminates the heavy CPU load typically caused when players explore new areas. This results in a much smoother gameplay experience, especially on servers with high player counts or heavy modpacks.

Key Features

  • Multi-Dimension Support: Pre-generate the Overworld, Nether, The End, or any modded dimension.
  • Flexible Radius: Define generation areas using either block-based or chunk-based coordinates.
  • Persistence: Generation tasks are saved and will automatically resume after a server restart.
  • Performance Modes: Choose between Serial (one by one) or Semi-Parallel generation to balance speed and stability.
  • Feedback System: Real-time progress updates sent to the console or online players.

Commands#

The mod is primarily controlled through the /pregen command. All commands require level 4 operator permissions (OP).

Core Generation Commands

Command Description
/pregen gen <dimension> start <type> <x> <z> <radius> [force] Starts a new pre-generation task.
/pregen gen <dimension> pause Pauses the active task in the specified dimension.
/pregen gen <dimension> resume Resumes a paused task in the specified dimension.
/pregen gen <dimension> cancel Stops and deletes the task for the specified dimension.
/pregen clear Cancels all currently queued and active pre-generation tasks.
/pregen list Displays a list of all active and pending generation tasks.

Parameter Details

  • <dimension>: The registry name of the world (e.g., minecraft:overworld, minecraft:the_nether).
  • <type>: Use block to define the radius in blocks, or chunk to define it in chunks (1 chunk = 16x16 blocks).
  • <x> <z>: The center coordinates of the generation area.
  • <radius>: The distance from the center to the edge of the generation zone.
  • [force]: (Optional) If set to true, the mod will re-generate chunks that already exist. Defaults to false (skips existing chunks).

Utility Commands

Command Description
/pregen sendFeedback Checks if progression feedback is currently enabled.
/pregen sendFeedback <boolean> Enables (true) or disables (false) progress messages in chat.

Mechanics#

World Pre Generator operates by hooking into the server's chunk loading system. Unlike standard exploration, it processes chunks in a controlled queue to prevent memory overflows.

Generation Modes

  1. SERIAL: This is the default and safest mode. It generates one chunk at a time, ensuring the server remains responsive to other tasks. It is recommended for low-spec servers.
  2. SEMI_PARALLEL: This mode initiates multiple chunk generation tasks simultaneously. While Minecraft's engine (as of 1.20.1+) still processes the actual generation serially, this mode reduces the overhead between chunks, significantly increasing overall speed.

Task Persistence

One of the mod's most powerful features is its ability to survive restarts. If a server crashes or is shut down during a 10,000-block radius generation, the mod will pick up exactly where it left off once the server is back online. This is handled via a dedicated data file stored within the world folder.

Memory Safety

The mod monitors the server's available RAM. If the memory usage exceeds safe thresholds, the generator will temporarily throttle its speed to allow the Garbage Collector to clear unused objects, preventing OutOfMemory (OOM) crashes.

Configuration#

The configuration file is located at world/serverconfig/world_pre_generator-server.toml. This file is unique to each world save.

Config Options

Option Type Default Description
send_feedback Boolean true Whether to broadcast generation progress to all online players.
generation.type Enum SERIAL The method of generation. Options: SERIAL, SEMI_PARALLEL.
semi_parallel_task_count Integer 4 Number of tasks to run in parallel when using SEMI_PARALLEL mode.

Important Note: If using SEMI_PARALLEL mode, it is highly recommended to set max-tick-time=-1 in your server.properties file. This prevents the server from watchdog-crashing if a single tick takes too long due to heavy generation.

Technical Specifications#

Compatibility

  • Modded Biomes: Fully compatible with Biomes O' Plenty, Terrablender, and Oh The Biomes You'll Go.
  • Modded Dimensions: Works with The Twilight Forest, Blue Skies, and Aether dimensions.

Performance Tips

  • Pre-Launch Generation: It is best practice to run the pre-generator while no players are online to allow the mod to utilize maximum CPU resources.
  • Disk Space: Be aware that pre-generating a large radius (e.g., 20,000+ blocks) will significantly increase the world file size. Ensure your hosting plan has sufficient SSD/HDD space before starting a massive task.
  • Radius Calculation: A radius of 1,000 chunks results in a 32,000 x 32,000 block area, which is usually sufficient for most survival communities.