midnightfreddie/nbt2json

Error parsing NBT

Opened this issue · 4 comments

I saved a .litematic (aka. schematic) using Litematica but I get this error:

root@DESKTOP:~/nbt2json/nbt2json-0.4.1# ./nbt2json -v
NBT to JSON version 0.4.0
root@DESKTOP:~/nbt2json/nbt2json-0.4.1# file crop.litematic
crop.litematic: gzip compressed data, original size modulo 2^32 6281
root@DESKTOP:~/nbt2json/nbt2json-0.4.1# ./nbt2json --java -i crop.litematic -o crop.json
Error parsing NBT: compound: reading a child tag: Error parsing NBT: compound: reading a child tag: Error parsing NBT: compound: reading a child tag: Error parsing NBT: Reading long in long array tag: unexpected EOF

I also tried using --big-endian & -b but all fail with the same error.

Is the file something you can share? I'm not currently set up to easily get Litematica and figure out how it works.

From the error I'm guessing I'm reading compound tags incorrectly. I think Minecraft declares compound tags but never actually has more than one compound item back to back, so it may just be a situation I was never able to test for.

Hello and thanks for your time and response. I'd be happy to share it with you. Can I email or dm you a link to the schematic download? It's just a 2k file.

@midnightfreddie I did email you the file a few days ago

Hello, is this problem solved? I was using nbt2json today with litematica and the same problem occured to me. Seems the parsing processing of BlockStates(a long array) was somehow problematic. 😭