diff --git a/lib/Consts2.dart b/lib/Consts2.dart index 354777c..c494f71 100644 --- a/lib/Consts2.dart +++ b/lib/Consts2.dart @@ -1 +1 @@ -const VERSION = "1.1.012325+1215"; +const VERSION = "1.1.012425+0821"; diff --git a/lib/Editor.dart b/lib/Editor.dart index c86ad2b..bffa2a2 100644 --- a/lib/Editor.dart +++ b/lib/Editor.dart @@ -109,7 +109,8 @@ class EditorState extends State { ListTile( title: const Text("O P E N"), leading: const Icon(Icons.folder), - subtitle: const Text("Open an existing NBT Document for editing"), + subtitle: + const Text("Open an existing NBT/SNBT Document for editing"), onTap: () async { if (await needsPermissionsPage()) { Navigator.pushNamed(context, "/perms"); @@ -130,7 +131,11 @@ class EditorState extends State { return; } else { // String!! - CompoundTag ct = await NbtIo.read(filePath); + CompoundTag ct = CompoundTag(); + if (filePath.endsWith(".txt") || filePath.endsWith(".snbt")) { + ct = await SnbtIo.readFromFile(filePath) as CompoundTag; + } else + CompoundTag ct = await NbtIo.read(filePath); SessionData.ROOT_TAG = ct; } diff --git a/pubspec.yaml b/pubspec.yaml index 64911f4..69be028 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: nbteditor description: A Minecraft NBT Editor written in Flutter publish_to: "none" -version: 1.1.012325+1215 +version: 1.1.012425+0821 environment: sdk: ^3.6.1