add decompress to try catch
This commit is contained in:
parent
15aae5c3d7
commit
167c27848a
2 changed files with 11 additions and 7 deletions
|
@ -81,11 +81,15 @@ class NbtIo {
|
|||
|
||||
static Future<CompoundTag> readFromStream(Uint8List list) async {
|
||||
_io = ByteLayer();
|
||||
_io.writeBytes(list);
|
||||
_io.resetPosition();
|
||||
_io.decompress();
|
||||
_io.resetPosition();
|
||||
|
||||
return Tag.readNamedTag(_io) as CompoundTag;
|
||||
try {
|
||||
_io.writeBytes(list);
|
||||
_io.resetPosition();
|
||||
_io.decompress();
|
||||
_io.resetPosition();
|
||||
} catch (E) {
|
||||
print(E);
|
||||
} finally {
|
||||
return Tag.readNamedTag(_io) as CompoundTag;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: libac_dart
|
||||
description: "Aria's Creations code library"
|
||||
version: 1.0.27
|
||||
version: 1.0.28
|
||||
homepage: "https://zontreck.com"
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue