Back to mods
ChunkOpt project artwork

Modrinth · Minecraft mod

ChunkOpt

☆ Accelerates chunk generation. When moving, priority is given to chunks located in the direction of the player's movement. Server threads, automatic chunk saving, data encoding/decoding, and the network transmission of chunks have been optimized.

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which ChunkOpt release should I use?

Updated today
beta file 1.0
Game version 1.21.1
Loader NeoForge

ChunkOpt 1.0 targets 1.21.1 with NeoForge. Installation on the client is optional. Installation on the dedicated server is optional. No extra mods listed for this file.

Where it goes

Is ChunkOpt required on the client, server, or both?

Installation on the client is optional. Installation on the dedicated server is optional.

Client Optional
Dedicated server Optional
Loader for this release NeoForge
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

The source marks this as usable on both the client and server.

What else does ChunkOpt 1.0 need?

1.0. Change the file and its required mods may change too.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

This file does not list any required or optional mods.

Before you install it

Add ChunkOpt without breaking your instance.

Built for ChunkOpt 1.0. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 1.0. It targets 1.21.1 with NeoForge; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    Installation on the client is optional. Installation on the dedicated server is optional.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 1.0. It opens that exact file at the source.

About this project

What does ChunkOpt add?

Accelerates chunk generation. When moving, priority is given to chunks located in the direction of the player's movement. Server threads, automatic chunk saving, data encoding/decoding, and the network transmission of chunks have been optimized.

ChunkOpt moves chunk work off the server thread and spreads the rest across ticks. Most paths have a config switch, and speculative paths fall back to vanilla.

Generation

Vanilla runs six generation steps on the single-flight worldgen mailbox. ChunkOpt posts them to the worker pool. FEATURES is the only step that can write into neighbouring chunks, so it takes a 3x3 chunk lock.

Generation tasks are sorted by distance with a small bonus for the player's heading. That puts the front of the view ahead of the rear. Only the posting order changes, not the terrain data.

In a paired A/B run over the same 625 chunks, the serial pipeline took 53.5 s and the parallel one 13.2 s. A 1,024-chunk forceload went from 64.5 s to 17.0-20.5 s.

Loading and saving

Section palettes are decoded on a worker while the region file is read. The server thread receives finished containers instead of decoding them. If the pre-decoded data does not match the exact NBT tag, the vanilla path runs. Repeated reads of a chunk with no region data are answered from memory until a write invalidates the entry.

The periodic autosave is drained with a 3 ms and 64-chunk cap per tick. NBT encoding runs on the IO pool from a snapshot. /save-all and shutdown still drain everything synchronously, so no async encode is left in flight.

On 511 chunks loaded from disk, average main-thread read time dropped from 2.48-2.53 ms to 1.87 ms. An autosave pass over 1,024 dirty chunks was spread across 9.5 s; the worst added tick was 11.15 ms against the 3 ms budget.

Tick costs

A fluid source surrounded by the same fluid on all six sides cannot move. Those updates are skipped. Over 1,024 chunks that removed 1,085,021 of 1,505,224 updates. Shorelines, caves and feature edges keep their vanilla updates.

The per-tick scan over every loaded holder is disabled while the incremental autosave is on. The unload queue is capped per tick, so a chunk still claimed by a generation task cannot spin the main thread.

Network and client

The next chunk batch is selected nearest-first with the heading bias. Packet construction uses a measured millisecond budget, so a large view crossing cannot eat the whole tick. Channel flushes are grouped per batch on the server and once per tick for play packets.

With the mod installed on the client, compiled chunk mesh uploads are limited per frame. That reduces the hitch when turning or crossing a chunk border.

Commands

  • /chunkopt stats - tick percentiles, autosave passes, load and save counts, fluid ticks skipped
  • /chunkopt autosave - run one incremental autosave pass
  • /chunkopt selftest save - compare snapshot encoding against the vanilla tag
  • /chunkopt reload - re-read the config

Config: config/chunkopt-server.toml.

Known limits

  • Feature placement order can differ from a vanilla run. Vanilla is already order-dependent here, so chunk hashes are not a parity check.
  • The synchronous wait for the first FULL chunk when a player joins is unchanged. A one-off 5.2 s join tick seen in a real log remains outside this mod.
  • GPU rendering batching is not part of this mod. GC pauses from a small heap are not mod bugs.

If you find bugs

🏆 Support the Author

🌐 Third-Party Hosting and distribution

You are not permitted to host this mod on third-party platforms or distribute it via third-party websites; the only authorized source for downloading the mod is Modrinth.

You may feature this mod on third-party websites, provided you do not rehost the files. All download buttons or links must point directly to this Modrinth page (https://modrinth.com/project/chunkopt) or use official Modrinth download URLs so that downloads are properly counted on Modrinth.

Project description from Modrinth.

Pick your setup

ChunkOpt by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

1 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

ChunkOpt versions and loaders

1 of 1 releases match

Looking for an older file? The official Modrinth project page is in Resources.