Wiki 9Minecraft Wiki 9Minecraft

ChunkAPI Mod FAQ

10 questions players actually ask, answered.

How do I start using ChunkAPI in my mod?
First, register your data handler using the centralized registry provided by ChunkAPI. Then, implement the data storage and syncing logic for your chunks using the mod's API methods. The guides on registering custom data handlers and storing custom chunk data will walk you through the setup.
What's the difference between chunk-level and section-level data?
Chunk-level data applies to the entire chunk, while section-level data is stored per block section (16×16×16 vertical slices). Use section-level NBT handling when you need to track data at finer vertical granularity, such as per-layer properties.
Do I need to manually edit base game files to use ChunkAPI?
No—that's the whole point of ChunkAPI. The mod handles all chunk data storage and networking without modifying base game classes, keeping your setup clean and compatible with other mods.
How does ChunkAPI sync data between server and client?
ChunkAPI intercepts and modifies vanilla chunk network packets (like S21PacketChunkData) to carry your custom data alongside the standard chunk information. This happens automatically once you register your data handler, so both sides stay in sync without extra work.
Will my custom chunk data survive a world reload?
Yes. ChunkAPI uses the chunk NBT system to persist your data across saves and loads. As long as your data handler is registered and your NBT serialization is correct, your custom data will be there when the chunk loads again.
Can multiple mods use ChunkAPI at the same time?
Yes. ChunkAPI's centralized registry lets many mods register their own data handlers without conflicts. Each handler manages its own data independently, so compatibility between mods using ChunkAPI is built in.
What happens if I unregister a data handler but the data is still in my world?
The data will remain stored in the chunk NBT, but it won't be loaded or synced since there's no handler for it. If you re-register the handler later, the data can be recovered.
Does ChunkAPI work on single-player worlds?
Yes. ChunkAPI handles both server-side and client-side data, so it works in single-player (where the client and server run together) and multiplayer.
How do I debug if my custom chunk data isn't syncing?
Check that your data handler is properly registered in the centralized registry and that your sync logic is implemented correctly. Review the sync guide to ensure you're using the right packet methods and that your NBT serialization matches on both sides.
Will using ChunkAPI slow down my world?
ChunkAPI is designed to be lightweight and only processes data for registered handlers. Performance impact depends on how much data you store and how often you sync it; keep your custom data structures efficient and avoid syncing unnecessarily.