{"id":40107,"date":"2026-06-02T00:24:43","date_gmt":"2026-06-01T21:24:43","guid":{"rendered":"https:\/\/vpesports.com\/minecraft\/mods\/chunkapi\/"},"modified":"2026-06-02T00:24:43","modified_gmt":"2026-06-01T21:24:43","slug":"chunkapi","status":"publish","type":"mod","link":"https:\/\/vpesports.com\/minecraft\/mods\/chunkapi\/","title":{"rendered":"ChunkAPI"},"content":{"rendered":"<p>A mod for adding custom data to chunks without the hassle of writing custom packets, event handling,<br \/>\nloading hooks, and more.<\/p>\n<p>### Licensed under the LGPLv3 license<\/p>\n<p>### Originally developed by FalsePattern<\/p>\n<p>### Mod logo by Houstonruss<\/p>\n<p>Goals<br \/>\n&#8212;&#8211;<\/p>\n<p>It is a goal to provide a way to add custom data to chunks without having to modify any vanilla classes.<br \/>\nThe API will also provide a simple way to implement the custom serialization\/deserialization of the data,<br \/>\nboth for the networking and the NBT format.<br \/>\nAn optional goal is to provide a way to register DFUs for the custom data, but this is not a priority.<\/p>\n<p>Non-Goals<br \/>\n&#8212;&#8212;&#8212;<\/p>\n<p>It is not a goal to provide any kind of callback\/hook system for anything except saving\/loading and netcode, any kind<br \/>\nof extra behavior should be implemented in the mod using ChunkAPI.<\/p>\n<p>Storage is not provided by the API, the user is expected to implement their own storage system. A good example<br \/>\nis using a mixin to add a field to the chunk class, and using that field to store the data.<\/p>\n<p>Motivation<br \/>\n&#8212;&#8212;&#8212;-<\/p>\n<p>Modifying chunk packet data involved incompatibly modifying network packets, the chunk class, and the anvil chunk loader,<br \/>\nwhich is a lot of work for a simple feature. This mod provides a way to add custom data to chunks without having<br \/>\nto modify any of the vanilla classes yourself.<\/p>\n<p>API and spec<br \/>\n&#8212;&#8212;&#8212;&#8211;<\/p>\n<p><!-- TODO update --><\/p>\n<p>The API exposes a way to add custom data to chunks, and a way to register custom serializers for the data.<\/p>\n<p>### ChunkDataManager<br \/>\nThe `ChunkDataManager` itself is the primary class used for managing registrations, but does not implement functionality<br \/>\nby itself. For that, you need to use the `PacketDataManager`, `ChunkNBTDataManager`, and `SectionNBTDataManager`<br \/>\ninterfaces included inside the ChunkDataManager class.<\/p>\n<p>### ChunkDataManager.PacketData<br \/>\nThis interface is used for synchronizing data from the server to the client. If your data is only required on the server,<br \/>\nyou can freely skip implementing this interface.<\/p>\n<p>### ChunkDataManager.ChunkNBTData<br \/>\nThis interface is used for saving\/loading data from the chunk NBT. This is required if you want to keep persistent data<br \/>\nacross world reloads. Note, if you store data *per block* in the chunk, you should use `SectionNBTData` instead, as it<br \/>\nis designed with the internal chunk format in mind.<\/p>\n<p>### ChunkDataManager.SectionNBTData<br \/>\nThis interface is mostly identical to `ChunkNBTData`, but is designed for storing data per block in the chunk.<br \/>\nInstead of being called once per chunk, it is called once per chunk section (16x16x16 blocks, `ExtendedBlockStage` class).<\/p>\n<p>### ChunkDataRegistry<br \/>\nThis is where you actually register your manager. You need to do all registrations inside the `init` phase.<br \/>\nYou can also disable specific manager IDs by calling `disableDataManager`, but this is not recommended, and should<br \/>\nonly be used if you know what you are doing. You need to do all the disabling inside the `postInit` phase.<\/p>\n<p>### Packet specification<\/p>\n<p>ChunkAPI modifies the S21PacketChunkData and S26PacketMapChunkBulk vanilla packets, and overwrites their default<br \/>\nformats.<\/p>\n<p>All sizes in the tables below are specified in bytes.<\/p>\n<p>S21PacketChunkData new format:<\/p>\n<p>| Size (bytes) | Datatype | Name                       |<br \/>\n|&#8212;&#8212;&#8212;&#8212;&#8211;|&#8212;&#8212;&#8212;-|&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-|<br \/>\n| 4            | int      | X position                 |<br \/>\n| 4            | int      | Z position                 |<br \/>\n| 1            | bool     | Force Update               |<br \/>\n| 2            | short    | ExtendedBlockStorage mask  |<br \/>\n| 4            | int      | Uncompressed data length   |<br \/>\n| 4            | int      | (n) Compressed data length |<br \/>\n| n            | byte[n]  | Compressed data            |<\/p>\n<p>S26PacketMapChunkBulk new format:<\/p>\n<p>| Size (bytes) | Datatype             | Name                            |<br \/>\n|&#8212;&#8212;&#8212;&#8212;&#8211;|&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-|&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;|<br \/>\n| 2            | short                | (n) Chunk count in packet       |<br \/>\n| n * 4        | int[n]               | Uncompressed chunk data lengths |<br \/>\n| 4            | int                  | (m) Compressed data length      |<br \/>\n| 1            | 1                    | Contains skylight data          |<br \/>\n| m            | byte[m]              | Compressed data                 |<br \/>\n| n * 10       | (int, int, short)[n] | Chunk Headers (x, z, ebs mask)  |<\/p>\n<p>In both cases, the compressed data is populated through the ChunkDataRegistryImpl.writeToBuffer method.<br \/>\nThe layout of this data is as follows:<\/p>\n<p>| Size (bytes) | Datatype | Name              |<br \/>\n|&#8212;&#8212;&#8212;&#8212;&#8211;|&#8212;&#8212;&#8212;-|&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-|<br \/>\n| 4            | int      | (n) Manager count |<br \/>\n| n * varying  | MGRData  | Manager data      |<\/p>\n<p>Manager data:<\/p>\n<p>| Size (bytes) | Datatype  | Name                    |<br \/>\n|&#8212;&#8212;&#8212;&#8212;&#8211;|&#8212;&#8212;&#8212;&#8211;|&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-|<br \/>\n| 4            | int       | (n) Manager name length |<br \/>\n| n            | UTF-8 str | Manager name            |<br \/>\n| 4            | int       | (m) Manager data length |<br \/>\n| m            | byte[m]   | Manager data            |<\/p>\n<p>Dependencies<br \/>\n&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>FalsePatternLib<\/p>\n<p>UniMixins<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Manage custom data inside chunks without hassle.<\/p>\n","protected":false},"featured_media":40108,"template":"","meta":{"_minecraft_slug":"chunkapi","_minecraft_project_id":"y0vBUOla","_minecraft_author":"FalsePattern","_minecraft_license":"LGPL-3.0-only","_minecraft_downloads":11749,"_minecraft_follows":8,"_minecraft_client_side":"required","_minecraft_server_side":"required","_minecraft_storage_type":"zip","_minecraft_archive_name":"chunkapi.zip","_minecraft_size_bytes":3375566,"_minecraft_version_count":21,"_minecraft_updated_at":"2026-05-16T03:02:55.244893Z","_minecraft_date_created":"2023-03-31T01:36:27.456246Z","_minecraft_date_modified":"2026-03-07T15:15:59.173319Z","_minecraft_project_url":"https:\/\/modrinth.com\/mod\/chunkapi","_minecraft_icon_attachment_id":40108,"_minecraft_imported_at":"2026-06-01T21:24:44+00:00","_minecraft_import_hash":"eadc7215e774cb2e4ca4ab63607252fc","_minecraft_versions":"","_minecraft_links":"","_minecraft_gallery":"","_minecraft_api_metadata":""},"mod_category":[104,873],"mod_loader":[106],"minecraft_version":[21],"class_list":["post-40107","mod","type-mod","status-publish","has-post-thumbnail","hentry","mod_category-forge","mod_category-library","mod_loader-forge","minecraft_version-1-7-10"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>ChunkAPI - Minecraft<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vpesports.com\/minecraft\/mods\/chunkapi\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ChunkAPI - Minecraft\" \/>\n<meta property=\"og:description\" content=\"Manage custom data inside chunks without hassle.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vpesports.com\/minecraft\/mods\/chunkapi\/\" \/>\n<meta property=\"og:site_name\" content=\"Minecraft\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/chunkapi\\\/\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/chunkapi\\\/\",\"name\":\"ChunkAPI - Minecraft\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/chunkapi\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/chunkapi\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/chunkapi-icon-8ab6714c087079b191fbd3934ad6241926f45b7b_96.webp\",\"datePublished\":\"2026-06-01T21:24:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/chunkapi\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/chunkapi\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/chunkapi\\\/#primaryimage\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/chunkapi-icon-8ab6714c087079b191fbd3934ad6241926f45b7b_96.webp\",\"contentUrl\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/chunkapi-icon-8ab6714c087079b191fbd3934ad6241926f45b7b_96.webp\",\"width\":96,\"height\":96},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/chunkapi\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mods\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"ChunkAPI\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\",\"name\":\"Minecraft\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"ChunkAPI - Minecraft","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vpesports.com\/minecraft\/mods\/chunkapi\/","og_locale":"en_US","og_type":"article","og_title":"ChunkAPI - Minecraft","og_description":"Manage custom data inside chunks without hassle.","og_url":"https:\/\/vpesports.com\/minecraft\/mods\/chunkapi\/","og_site_name":"Minecraft","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/vpesports.com\/minecraft\/mods\/chunkapi\/","url":"https:\/\/vpesports.com\/minecraft\/mods\/chunkapi\/","name":"ChunkAPI - Minecraft","isPartOf":{"@id":"https:\/\/vpesports.com\/minecraft\/#website"},"primaryImageOfPage":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/chunkapi\/#primaryimage"},"image":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/chunkapi\/#primaryimage"},"thumbnailUrl":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/chunkapi-icon-8ab6714c087079b191fbd3934ad6241926f45b7b_96.webp","datePublished":"2026-06-01T21:24:43+00:00","breadcrumb":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/chunkapi\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vpesports.com\/minecraft\/mods\/chunkapi\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vpesports.com\/minecraft\/mods\/chunkapi\/#primaryimage","url":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/chunkapi-icon-8ab6714c087079b191fbd3934ad6241926f45b7b_96.webp","contentUrl":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/chunkapi-icon-8ab6714c087079b191fbd3934ad6241926f45b7b_96.webp","width":96,"height":96},{"@type":"BreadcrumbList","@id":"https:\/\/vpesports.com\/minecraft\/mods\/chunkapi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vpesports.com\/minecraft\/"},{"@type":"ListItem","position":2,"name":"Mods","item":"https:\/\/vpesports.com\/minecraft\/mods\/"},{"@type":"ListItem","position":3,"name":"ChunkAPI"}]},{"@type":"WebSite","@id":"https:\/\/vpesports.com\/minecraft\/#website","url":"https:\/\/vpesports.com\/minecraft\/","name":"Minecraft","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vpesports.com\/minecraft\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod\/40107","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod"}],"about":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/types\/mod"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media\/40108"}],"wp:attachment":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media?parent=40107"}],"wp:term":[{"taxonomy":"mod_category","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_category?post=40107"},{"taxonomy":"mod_loader","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_loader?post=40107"},{"taxonomy":"minecraft_version","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/minecraft_version?post=40107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}