This repository was archived by the owner on Sep 20, 2024. It is now read-only.
List of proposals for v2 #7
Open
Description
@jglrxavpok told me to make an issue with these, for easier tracking, so here we are.
Here's the list of proposals I have for things in v2:
- Make
NBTEnd
an object, since it only needs one instance and doesn't ever need to be copied. - Add an
EMPTY
constant forNBTCompound
, which is an immutable compound with an empty backing map. Also add one forNBTList
, which is an immutable list with elements of typeTAG_End
backed by an empty list. - Add
ONE
andZERO
constants forNBTByte
, which are both immutable with backing values of 1 and 0 respectively (for easier boolean conversions). - Allow getting/setting booleans on compounds, with functions such as
getBoolean
/setBoolean
. - Add a new method for getting every type from a compound with a
default
value, and these methods should never return null. For example,getString("my_key", "my_default")
would look for a string in the map with the key "my_key", or else it would return "my_default" if no such value was found. - Add constructors to
NBTList
andNBTCompound
that accept lists and maps respectively, for easier construction. - Expose the backing map of an
NBTCompound
and the backing list of anNBTList
in some way, whether this be an immutable copy, or just the actual map itself. - Possibly add a better way to read compound tags, instead of having to construct a new reader and then read and perform an unchecked cast.
- Add support for ZLIB compression when reading/writing NBT data. For reference, Adventure does this by having a compression type pseudo enum with compress and decompress methods that are implemented in their respective types, perhaps you could do something similar?
- Support initialising the
NBTReader
andNBTWriter
with aPath
object as well as with aFile
. - Support for calls like
getOrElse
andgetOrNull
on anNBTList
. Would probably be better ifNBTList
just implementedList<Tag>
instead ofIterable<Tag>
.
Hope this helps you keep track of everything!
Metadata
Metadata
Assignees
Labels
No labels