Open dzikoysk opened 3 years ago
Several details to be confirmed:
byte_array
or bytearray
?type
field does not exist? Guess the type from value
field or just throw an error?Thanks for quick response :)
minecraft-data
uses byte_array
to describe the protocol, so it might be a fair candidate. Considering that it's not an official standard and it will depend on at least one JSON library, a new repo (depending on this) will be created for this feature. Please wait for our follow-up actions.
I've created a simple mapper from JSON to NBT, so it's not a problem for me. I reported it to just let you know that some people may also find it useful in the future.
Instead of a new repo, you could also consider modularization of this one like this:
nbt-parent/ - parent settings for both modules
nbt/ - core NBT module
nbt-json/ - JSON support for NBT module
In most cases it's the best solution for such a projects.
Hey,
It might be a good idea to support JSON format that stores NBT data. There is a couple of available libraries (like
minecraft-data
) and it could be quite helpful. It is also supported by all of the IDEs and editors, so it also improves the experience during the process of development such a data.Here is an example file that represents NBT in JSON: https://github.com/PrismarineJS/minecraft-data/blob/master/data/pc/1.16.2/loginPacket.json (the
dimension-codec
section, it's mixed file`)Thanks :)