ForeverZer0 / SharpNBT

A pure CLS-compliant C# implementation of the Named Binary Tag (NBT) format specification commonly used with Minecraft applications, allowing easy reading/writing streams and serialization to other formats.
MIT License
25 stars 9 forks source link

FTB Questions #24

Closed Akizon77 closed 11 months ago

Akizon77 commented 1 year ago

The SNBT file for FTB Questions ends with a newline character, and I modified it to support this format. However, standard SNBT may no longer be read properly. (not tested)

Snipaste_2023-09-10_21-37-58
ForeverZer0 commented 1 year ago

I am somewhat apprehensive to support this, as it is likely to break both existing and compliant SNBT, where newlines between items is considered insignificant whitespace, not a lexicographical deliminator for items.

If support for such a feature were to be added, it would have to be enabled explicitly by the user of the library via an additional argument, method overload, etc. The default behavior for the scanner should always be "strict", with any feature additions or relaxation on the spec being a configuration switch.

Even with that, I would still be apprehensive about this specific issue, as this is adding extra complexity to support what is essentially just invalid SNBT and/or a custom format.