Update NBT Dependency

This commit is contained in:
zontreck 2025-02-03 12:29:57 -07:00
parent 31d6cee09b
commit 756bedb371
3 changed files with 9 additions and 7 deletions

View file

@ -1 +1 @@
const VERSION = "1.1.020325+1153"; const VERSION = "1.1.020325+1229";

View file

@ -137,9 +137,11 @@ class EditorState extends State<Editor> {
// String!! // String!!
CompoundTag ct = CompoundTag(); CompoundTag ct = CompoundTag();
if (filePath.endsWith(".txt") || filePath.endsWith(".snbt")) { if (filePath.endsWith(".txt") || filePath.endsWith(".snbt")) {
ct = await SnbtIo.readFromFile(filePath) as CompoundTag; var strData = await result!.readAsString();
ct = await SnbtIo.readFromString(strData) as CompoundTag;
} else { } else {
ct = await NbtIo.read(filePath); var data = await result!.readAsBytes();
ct = await NbtIo.readFromStream(data) as CompoundTag;
} }
SessionData.ROOT_TAG = ct; SessionData.ROOT_TAG = ct;

View file

@ -1,7 +1,7 @@
name: nbteditor name: nbteditor
description: A Minecraft NBT Editor written in Flutter description: A Minecraft NBT Editor written in Flutter
publish_to: "none" publish_to: "none"
version: 1.1.020325+1153 version: 1.1.020325+1229
environment: environment:
sdk: ^3.6.1 sdk: ^3.6.1
@ -12,7 +12,7 @@ dependencies:
flutter_code_editor: ^0.3.2 flutter_code_editor: ^0.3.2
libac_dart: libac_dart:
hosted: https://git.zontreck.com/api/packages/AriasCreations/pub/ hosted: https://git.zontreck.com/api/packages/AriasCreations/pub/
version: ^1.4.012225+0413 version: ^1.4.020325+1215
cupertino_icons: ^1.0.8 cupertino_icons: ^1.0.8
flutter_highlighting: ^0.9.0+11.8.0 flutter_highlighting: ^0.9.0+11.8.0
flutter_treeview: flutter_treeview:
@ -21,14 +21,14 @@ dependencies:
permission_handler: ^11.3.1 permission_handler: ^11.3.1
libacflutter: libacflutter:
hosted: https://git.zontreck.com/api/packages/AriasCreations/pub/ hosted: https://git.zontreck.com/api/packages/AriasCreations/pub/
version: ^1.0.013125+1423 version: ^1.0.020325+1224
file_selector: ^1.0.3 file_selector: ^1.0.3
flutter_highlight: any flutter_highlight: any
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
flutter_lints: ^4.0.0 flutter_lints: ^5.0.0
flutter: flutter:
uses-material-design: true uses-material-design: true