static void WriteSimpleList <T>(INbtList <T> list, int depth) { Console.WriteLine($"({list.Count}-item List of {list.Type}):"); int index = 0; foreach (T item in list) { Console.Write("|-".PadRight(2 + depth, '-')); Console.Write($">> [{index}] "); Console.WriteLine(item); } }
static void WriteCompoundList(INbtList <INbtStream> list, int depth) { Console.WriteLine($"({list.Count}-item List of Compound):"); int index = 0; foreach (INbtStream item in list) { Console.Write("|-".PadRight(2 + depth, '-')); Console.WriteLine($">> [{index++}] (compound)"); item.Reset(); while (item.MoveNext()) { ExploreValue(item.CurrentValue, depth + 1); } } }