1
0

Make indent configurable

This commit is contained in:
2024-03-15 23:47:53 +01:00
parent 0ed39efd82
commit 94a9972206

View File

@@ -17,6 +17,7 @@ public static class SNbt
public static readonly SerializerOptions Default = new();
public SerializationStyle Style { get; init; } = SerializationStyle.Compact;
public string Indent { get; init; } = " ";
public bool AlwaysQuoteTagNames { get; init; } = false;
// public bool AlwaysQuoteStringTags { get; init; } = false;
}
@@ -101,7 +102,7 @@ public static class SNbt
{
for (var i = 0u; i < depth; i++)
{
writer.Write(" ");
writer.Write(options.Indent);
}
}