JaderoChan/mcnbt
LibraryAn easy-to-use Header-Only read and write library in MC NBT format. High performance, supports de/compression, supports Java version and Bedrock version
An easy-to-use Header-Only read and write library in MC NBT format. High performance, supports de/compression, supports Java version and Bedrock version, and extra bedrock version entity data structure.
No GitHub topics on this repo.
- C++96.9%
- CMake3.1%
1 Review
MCNBT is a focused and useful C++ library for a niche that Minecraft tooling developers do run into: reading, writing, and transforming NBT data across Java and Bedrock conventions. The strongest part of the project is that it keeps adoption lightweight. A header-only C++11 design, CMake install support, optional gzip/zlib handling, and examples for reading/writing, SNBT output, compression, and Bedrock .mcstructure usage make it approachable for someone who wants to embed NBT support without pulling in a large framework. The API also seems thoughtfully shaped around practical NBT work: endian selection is explicit, helper constructors like gInt, gCompound, and gList reduce boilerplate, and the Bedrock-specific be module shows real domain knowledge beyond just implementing the base tag types.
The README is more complete than many small libraries, especially with both Chinese and English documentation, install instructions, build options, and sample code. I also like that the repo includes sample NBT/SNBT data and a separate Bedrock data-structure document; those are the kinds of materials that help users verify behavior against real files. The MIT license, recent v1.0.1 release, and 294 commits are good maintenance signals for a 5-star project.
The biggest improvement would be turning the example programs into automated tests and adding GitHub Actions for at least Linux builds with MCNBT_ENABLE_GZIP on/off. The current examples cover useful boundary cases, but consumers would trust the library more if endianness, gzip round trips, duplicate tag handling, parent/self-assignment behavior, and SNBT formatting were checked in CI. A few polish items would also help adoption: fix small typos such as boundary_texst, tighten the English README wording, and clearly document current limitations like SNBT-to-NBT parsing still being on the TODO list. Overall, this is a practical, well-scoped library with a clear audience; stronger CI and test coverage would make it much easier to recommend for production Minecraft tooling.
