An NBT library for reading and writing NBT files/data Nuget package
var Compound = NBTReader.ReadFile("Path to file", Endian.Little, NBTCompression.Auto);
var age = Compound.GetChild("Age");
//Retrieve value if you know what type it should be
Int32 item = age.GetValue<Int32>();
//OR
if (age is NBTTagInt a) {
Assert.IsTrue(a.Value == 256, "Hello set wrong")
}
//OR
if (age.TryGetValue(out Int32 item)) {
Assert.IsTrue(item == 256, "Hello set wrong")
}
//OR
var item = Compound.GetChild<Int32>("Age");
ITag Tag;
//Writes the tag to the specified file using GZIP compression and little-endian methods
NBTWriter.WriteFile("Path to file", Tag, NBTCompression.Gzip, Endian.Little);
//Writes the tag to the specified file using no compression and little-endian methods
NBTWriter.WriteFile("Path to file", Tag, Endian.Little);
CompoundBuilder Builder = new CompoundBuilder("Root", 10);
Builder.Add("IsDetermined", true);
Builder.Add("Amount", 5);
ITag = Builder.GetResult();
Check that the NuGet packages have been downloaded.