Initial SNBT implementation
This commit is contained in:
parent
c10ffc58b8
commit
84b37f8b04
16 changed files with 137 additions and 0 deletions
|
@ -3,6 +3,8 @@ import 'dart:io';
|
|||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:libac_flutter/nbt/NbtIo.dart';
|
||||
import 'package:libac_flutter/nbt/NbtUtils.dart';
|
||||
import 'package:libac_flutter/nbt/Stream.dart';
|
||||
import 'package:libac_flutter/nbt/Tag.dart';
|
||||
import 'package:libac_flutter/nbt/impl/CompoundTag.dart';
|
||||
import 'package:libac_flutter/nbt/impl/StringTag.dart';
|
||||
import 'package:libac_flutter/utils/uuid/UUID.dart';
|
||||
|
@ -55,4 +57,12 @@ void main() {
|
|||
var newID = NbtUtils.readUUID(tag, "test");
|
||||
expect(id.toString(), newID.toString());
|
||||
});
|
||||
|
||||
test("Read HelloWorld, Output to SNBT", () async {
|
||||
CompoundTag ct =
|
||||
await NbtIo.read("${Directory.current.path}/test/hello_world.nbt");
|
||||
StringBuilder sb = StringBuilder();
|
||||
Tag.writeStringifiedNamedTag(ct, sb, 0);
|
||||
print(sb.toString());
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue