Simple library for converting and compressing stringified nbt (.snbt) files into .nbt files.
Used by Sonar for processing compressed NBT mappings for Minecraft packets
Issues | Pull Requests | Discord | License
- Add the dependency to your project
- Prepare your
.snbt
file you would like to read/convert.
Convert SNBT to NBT
final Path snbt = new File("test.snbt").toPath();
final CompoundBinaryTag converted = SNBTConverter.from(snbt);
Save the converted SNBT to a NBT file
final Path snbt = new File("test.snbt").toPath();
final Path nbt = new File("test-output.nbt").toPath();
// snbt2nbt(Path,Path) uses GZIP compression by default
SNBTConverter.snbt2nbt(snbt, nbt);
Use a compressor (GZIP, ZLIB, NONE)
// ...
SNBTConverter.snbt2nbt(snbt, nbt, NBTCompressor.GZIP);
snbt2nbt is licensed under the GNU General Public License 3.0.