SNBT Serialization now implemented
This commit is contained in:
parent
84b37f8b04
commit
daf9cb7376
16 changed files with 54 additions and 28 deletions
|
@ -85,7 +85,7 @@ abstract class Tag {
|
|||
static void writeStringifiedNamedTag(
|
||||
Tag tag, StringBuilder builder, int indents) {
|
||||
if (tag.getType() != 0) {
|
||||
if (builder != "") {
|
||||
if (!builder.isEmpty) {
|
||||
// Write name
|
||||
if (tag.shouldQuoteName()) {
|
||||
builder.append("${"".padLeft(indents, "\t")}\"${tag.getKey()}\": ");
|
||||
|
@ -93,7 +93,7 @@ abstract class Tag {
|
|||
builder.append("${"".padLeft(indents, '\t')}${tag.getKey()}: ");
|
||||
}
|
||||
|
||||
tag.writeStringifiedValue(builder, indents + 1);
|
||||
tag.writeStringifiedValue(builder, indents + 1, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@ abstract class Tag {
|
|||
}
|
||||
}
|
||||
|
||||
void writeStringifiedValue(StringBuilder builder, int indent);
|
||||
void writeStringifiedValue(StringBuilder builder, int indent, bool isList);
|
||||
|
||||
bool equals(dynamic object) {
|
||||
if (object == null || object is! Tag) return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue