rename tag for nbt_type to list instead of noarray and add documentation

This commit is contained in:
Mark Asp
2020-09-21 20:58:31 -05:00
parent a5e6d87aaf
commit 473669cbce
3 changed files with 53 additions and 4 deletions

View File

@ -186,11 +186,11 @@ func parseTag(f reflect.StructField, tagName string) tagProps {
nbtType := f.Tag.Get("nbt_type")
result.Type = getTagType(f.Type)
if strings.Contains(nbtType, "noarray") {
if strings.Contains(nbtType, "list") {
if IsArrayTag(result.Type) {
result.Type = TagList // for expanding the array to a standard list
} else {
panic("noarray is only supported for array types (byte, int, long)")
panic("list is only supported for array types (byte, int, long)")
}
}