-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Back Nbt*Array
s with List
s, and encode arrays as NbtList
by default, and require @NbtArray
#34
Comments
Additional problem with the way it's done in v0.11, and deciding if it should be an NBT Array by detecting if the descriptor is a builtin array serializer's descriptor: When delegating the serialization process to a |
There should be a way for a descriptor to specify that it definitely is or is not an NBT array. For example, this should not work: @Serializable
class MyClass(
@NbtArray
val collection: NbtList<*>
) Having an optional way to specify could solve this: annotation class NbtArray(val isNbtArray: Boolean = true) NbtList could have And similarly, the NBT arrays could have |
It could also be useful to have a configuration option to encode Inspired by kotlinx.serialization's |
List
instead ofArray
types (generally a good practice in Kotlin)NbtList
s more easilyNbt*Array
types be constructed from listsNbtArray
s was not possible and required copying to new arraysNbtIntArray(intArray.asList())
The text was updated successfully, but these errors were encountered: