Back `Nbt*Array`s with `List`s, and encode arrays as `NbtList` by default, and require `@NbtArray`
BenWoodworth opened this issue · 1 comments
BenWoodworth commented
- Encourages using
List
instead ofArray
types (generally a good practice in Kotlin) - Allows Arrays to be serialized as
NbtList
s more easily- currently required a custom serializer
- would otherwise require more machinery to support
- Lets
Nbt*Array
types be constructed from lists- currently, wrapping lists in
NbtArray
s was not possible and required copying to new arrays - still supports arrays, just with e.g.
NbtIntArray(intArray.asList())
- currently, wrapping lists in