Register a Custom Data Handler
Understanding Data Handlers
A data handler is how mods tell ChunkAPI what custom information to manage. Handlers define how data is stored, loaded, and synced for specific features.
Registration Process
Data handlers are registered through ChunkAPI's centralized registry system. When a mod initializes, it registers its handler by providing:
- An identifier for the data type
- Logic for saving data to NBT format
- Logic for loading data from NBT format
- Instructions for syncing to clients
Once registered, ChunkAPI automatically manages that data across all chunks in your world.
For Mod Developers
If you're developing a mod that uses ChunkAPI, consult the mod's API documentation for the specific registration methods and interfaces. You'll typically register handlers during your mod's initialization phase.
For Players
You don't need to manually register handlers—mods that depend on ChunkAPI handle this automatically when they load. Simply install ChunkAPI and any mods built on it, and data handling works behind the scenes.