diff --git a/lib/nbt/NbtIo.dart b/lib/nbt/NbtIo.dart index f0ab573..4338584 100644 --- a/lib/nbt/NbtIo.dart +++ b/lib/nbt/NbtIo.dart @@ -81,11 +81,15 @@ class NbtIo { static Future 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; + } } } diff --git a/pubspec.yaml b/pubspec.yaml index cfe41a8..3288df8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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"