BenWoodworth / knbt

Kotlin NBT library for kotlinx.serialization
GNU Lesser General Public License v3.0
72 stars 2 forks source link

Check that SNBT on JS reads/writes floats/doubles correctly #42

Open BenWoodworth opened 4 months ago

BenWoodworth commented 4 months ago

Kotlin/JS (and JavaScript in general) will stringify Floats/Doubles differently than on other targets, so make sure the TAG_Float and TAG_Double string representations are compatible with Minecraft's SNBT implementation.

For example, 10^100:

This applies to StringifiedNbt, and to NbtFloat/NbtDouble.toString()