diff --git a/lib/nbt/Tag.dart b/lib/nbt/Tag.dart index d0b3748..09d7092 100644 --- a/lib/nbt/Tag.dart +++ b/lib/nbt/Tag.dart @@ -41,14 +41,19 @@ enum TagType { return TagType.End; } + static const ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + static TagType getStringifiedTagType(StringReader reader) { reader.startSeek(); TagType ret = TagType.End; bool isNumber = true; + bool isAlpha = true; // Is digits only // Start to determine the next tag type while (reader.canRead && ret == TagType.End) { var val = reader.next().toUpperCase(); + if (ALPHABET.indexOf(val) == -1) isAlpha = false; + switch (val) { case "{": { @@ -137,6 +142,8 @@ enum TagType { } reader.endSeek(); + if (!isNumber && isAlpha) ret = TagType.String; + return ret; } } diff --git a/pubspec.yaml b/pubspec.yaml index 8339ee0..4e53b62 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: libac_dart description: "Aria's Creations code library" -version: 1.0.36 +version: 1.0.37 homepage: "https://zontreck.com"