ChunkAPI

ChunkAPI

Manage custom data inside chunks without hassle.

by
12.7K Downloads
forgelibrary
Rent Server with this Mod

About this Mod

A mod for adding custom data to chunks without the hassle of writing custom packets, event handling,
loading hooks, and more.

Licensed under the LGPLv3 license

Originally developed by FalsePattern

Mod logo by Houstonruss

Goals

It is a goal to provide a way to add custom data to chunks without having to modify any vanilla classes.
The API will also provide a simple way to implement the custom serialization/deserialization of the data,
both for the networking and the NBT format.
An optional goal is to provide a way to register DFUs for the custom data, but this is not a priority.

Non-Goals

It is not a goal to provide any kind of callback/hook system for anything except saving/loading and netcode, any kind
of extra behavior should be implemented in the mod using ChunkAPI.

Storage is not provided by the API, the user is expected to implement their own storage system. A good example
is using a mixin to add a field to the chunk class, and using that field to store the data.

Motivation

Modifying chunk packet data involved incompatibly modifying network packets, the chunk class, and the anvil chunk loader,
which is a lot of work for a simple feature. This mod provides a way to add custom data to chunks without having
to modify any of the vanilla classes yourself.

API and spec

The API exposes a way to add custom data to chunks, and a way to register custom serializers for the data.

ChunkDataManager

The ChunkDataManager itself is the primary class used for managing registrations, but does not implement functionality
by itself. For that, you need to use the PacketDataManager, ChunkNBTDataManager, and SectionNBTDataManager
interfaces included inside the ChunkDataManager class.

ChunkDataManager.PacketData

This interface is used for synchronizing data from the server to the client. If your data is only required on the server,
you can freely skip implementing this interface.

ChunkDataManager.ChunkNBTData

This interface is used for saving/loading data from the chunk NBT. This is required if you want to keep persistent data
across world reloads. Note, if you store data per block in the chunk, you should use SectionNBTData instead, as it
is designed with the internal chunk format in mind.

ChunkDataManager.SectionNBTData

This interface is mostly identical to ChunkNBTData, but is designed for storing data per block in the chunk.
Instead of being called once per chunk, it is called once per chunk section (16x16x16 blocks, ExtendedBlockStage class).

ChunkDataRegistry

This is where you actually register your manager. You need to do all registrations inside the init phase.
You can also disable specific manager IDs by calling disableDataManager, but this is not recommended, and should
only be used if you know what you are doing. You need to do all the disabling inside the postInit phase.

Packet specification

ChunkAPI modifies the S21PacketChunkData and S26PacketMapChunkBulk vanilla packets, and overwrites their default
formats.

All sizes in the tables below are specified in bytes.

S21PacketChunkData new format:

Size (bytes) Datatype Name
4 int X position
4 int Z position
1 bool Force Update
2 short ExtendedBlockStorage mask
4 int Uncompressed data length
4 int (n) Compressed data length
n byte[n] Compressed data

S26PacketMapChunkBulk new format:

Size (bytes) Datatype Name
2 short (n) Chunk count in packet
n * 4 int[n] Uncompressed chunk data lengths
4 int (m) Compressed data length
1 1 Contains skylight data
m byte[m] Compressed data
n * 10 (int, int, short)[n] Chunk Headers (x, z, ebs mask)

In both cases, the compressed data is populated through the ChunkDataRegistryImpl.writeToBuffer method.
The layout of this data is as follows:

Size (bytes) Datatype Name
4 int (n) Manager count
n * varying MGRData Manager data

Manager data-blocked:

Size (bytes) Datatype Name
4 int (n) Manager name length
n UTF-8 str Manager name
4 int (m) Manager data length
m byte[m] Manager data

Dependencies

FalsePatternLib

UniMixins

Available Versions

0.8.3release
MC 1.7.10forge
May 21, 2026
0.8.2release
MC 1.7.10forge
March 7, 2026
0.8.1release
MC 1.7.10forge
February 6, 2026
0.8.0release
MC 1.7.10forge
January 23, 2026
0.7.0release
MC 1.7.10forge
October 16, 2025

How to Install ChunkAPI on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set forge Loader

In the panel under "Egg", select the forge loader and matching Minecraft version (1.7.10).

3

Install Mod

Open the mod browser in the dashboard and search for "ChunkAPI". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

forge

Minecraft Versions

1.7.10

Server-side

Required

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

ChunkAPI server crashes on startup – what to do?

Most common cause: wrong forge version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.7.10). You can switch loaders with one click in the panel.

Is ChunkAPI compatible with forge?

ChunkAPI officially supports forge for Minecraft 1.7.10. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with ChunkAPI – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if ChunkAPI consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install ChunkAPI with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
GNU Lesser General Public License v3.0 only
Server-side
Required

Supported Versions

1.7.10