NBTWriter

public final class NBTWriter

A utility class for writing NBT data to various destinations/formats

Author

Nullicorn

Functions

Link copied to clipboard
public static void write(NBTCompound data, OutputStream outputStream)
Serialize, gzip, and write the provided NBT data and write it to an output stream
public static void write(    NBTCompound data,     OutputStream outputStream,     boolean useCompression)
Serialize the provided NBT data and write it to an output stream If control over the root tag's name is needed, use write instead.
public static void write(    NBTCompound data,     OutputStream outputStream,     String rootCompoundName,     boolean useCompression)
Serialize the provided NBT data and write it to an output stream If the root compound's name doesn't matter, use write instead.
Link copied to clipboard
public static Array<byte> writeToBase64(NBTCompound data)
Serialize, gzip, and base64-encode the provided NBT data (in that order)
public static Array<byte> writeToBase64(NBTCompound data, boolean useCompression)
Serialize and base64-encode the provided NBT data If control over the root tag's name is needed, use writeToBase64 instead.
public static Array<byte> writeToBase64(    NBTCompound data,     String rootCompoundName,     boolean useCompression)
Serialize and base64-encode the provided NBT data If the root compound's name doesn't matter, use writeToBase64 instead.
Link copied to clipboard
public static void writeToFile(NBTCompound data, File file)
Serialize, gzip, and write to file the provided NBT data
public static void writeToFile(    NBTCompound data,     File file,     boolean useCompression)
Serialize the provided NBT data and write it to a file If control over the root tag's name is needed, use writeToFile instead.
public static void writeToFile(    NBTCompound data,     File file,     String rootCompoundName,     boolean useCompression)
Serialize the provided NBT data and write it to a file If the root compound's name doesn't matter, use writeToFile instead.