nbt_codec 1.0.1 copy "nbt_codec: ^1.0.1" to clipboard
nbt_codec: ^1.0.1 copied to clipboard

outdatedDart 1 only

NBT Codec is a Minecraft NBT tag reader and writer that works in both browser and server.

Dart NBT Codec #

Build Status

This library for Dart allows you to read and write NBT structures, you can also supply the compression type to deflate the nbt data.

The libraries provides an example inside the example directory. The tests files also contains an example for loading nbt data via the browser.

Documentation: http://tom.caserta.co.uk/documentation/nbt_codec/index.html

Example Usage #

First import the nbt codec (and io if you are using serverside file loading):

import "package:nbt_codec/nbt_codec.dart";

Then in your main load in an NBT file

void main () {
  File f = new File("level.dat");
  CompoundTag tag = readNBT(f.readAsBytesSync(), compressionType: CompressionType.G_ZIP);
  print(tag);
}

This will output a json serialized representation of your level.dat nbt data.

Read the documentation to find out how to further manipulate the NBT Data

TODO #

  • Better examples
  • Better hashCode handling
  • Check that Int64 is handled correctly on dart2js
  • Implement the Java modified version of readUTF for UTF8 Strings
0
likes
0
points
26
downloads

Documentation

Documentation

Publisher

unverified uploader

Weekly Downloads

NBT Codec is a Minecraft NBT tag reader and writer that works in both browser and server.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

archive, collection, fixnum

More

Packages that depend on nbt_codec