nbt2json icon indicating copy to clipboard operation
nbt2json copied to clipboard

Error parsing NBT

Open epifeny opened this issue 3 years ago • 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.

epifeny avatar Feb 17 '22 07:02 epifeny

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.

midnightfreddie avatar Feb 18 '22 01:02 midnightfreddie

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.

epifeny avatar Feb 18 '22 06:02 epifeny

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

epifeny avatar Feb 23 '22 08:02 epifeny

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. 😭

BreakEnder233 avatar Aug 08 '23 09:08 BreakEnder233