diff --git a/GCMCTest/GCMCTest.csproj b/GCMCTest/GCMCTest.csproj new file mode 100644 index 0000000..eb25fae --- /dev/null +++ b/GCMCTest/GCMCTest.csproj @@ -0,0 +1,16 @@ + + + + Exe + netcoreapp3.0 + + + + + + + + + + + diff --git a/GCMCTest/Program.cs b/GCMCTest/Program.cs new file mode 100644 index 0000000..b61af03 --- /dev/null +++ b/GCMCTest/Program.cs @@ -0,0 +1,34 @@ +using System; +using System.Threading.Channels; +using fNbt; +using GCMC; + +namespace GCMCTest +{ + class Program + { + static void Main(string[] args) + { + /*var nbtFile = new NbtFile(); + nbtFile.LoadFromFile("r.-1.-1.mca", NbtCompression.None, tag => + { + Console.WriteLine(tag); + return true; + }); + Console.WriteLine(nbtFile);*/ + using (var rf = new RegionFile("r.-1.-1.mca")) + { + Console.WriteLine(rf); + Console.WriteLine(rf.HasChunk(1, 2)); + Console.WriteLine(rf.LastModified + " " + rf.SizeDelta); + foreach (var br in rf.GetChunks()) + { + var nbt = new NbtFile(); + nbt.LoadFromStream(br.BaseStream, NbtCompression.AutoDetect); + Console.WriteLine(nbt); + Console.WriteLine(nbt.RootTag); + } + } + } + } +}