Some utility methods/properties could be added on kotlin classes to simplify creation of Nbt types.
I actually have some methods listed in the examples on some projects and I use them often.
Exemples :
"test".nbt to transform a String to a NbtString.
true.asNbtByte() to transform a Boolean to a NbtByte.
listOf(1, 2, 3).asNbtList() to transform a List of Number to the NbtList version, maybe to the Nbt[Number]Array version when possible.
Some utility methods/properties could be added on kotlin classes to simplify creation of Nbt types. I actually have some methods listed in the examples on some projects and I use them often.
Exemples :
"test".nbt
to transform aString
to aNbtString
.true.asNbtByte()
to transform aBoolean
to aNbtByte
.listOf(1, 2, 3).asNbtList()
to transform aList
ofNumber
to theNbtList
version, maybe to theNbt[Number]Array
version when possible.