EpicBanItemTeam / VirtualChest

A sponge plugin providing virtual chest GUIs for menus like ChestCommands
https://ore.spongepowered.org/zzzz/VirtualChest
GNU Lesser General Public License v3.0
34 stars 12 forks source link

[REQUEST]Improved documentation for nbt #88

Open SirFancyBacon opened 5 years ago

SirFancyBacon commented 5 years ago

Hello, Could you improve the documentation for nbt data? Most specifically The UnsafeData attribute and The UnsafeData attribute.

Just a few examples with some explanation will be fine. I have for example been unable to get UnsafeData working for me in anyway shape or form..

ustc-zzzz commented 5 years ago

The UnsafeData works properly in most cases. However, some differences between HOCON and NBT String make some UnsafeData not working normally, and there is currently not any solution which is simple and elegant enough to solve this problem.

The core of the problem is that: HOCON is not a superset of NBT String. Consider that there are six types of numbers (byte, short, int, long, float, and double) for NBT String while there is only one type of representation in HOCON. Then consider that there are three types of arrays (byte arrays, int arrays and long arrays) defined in NBT String format while they have no suitable representation in HOCON at all.

I suspect that #55 is also because of this but I don't know how to solve this problem till now.