tryashtar / nbt-studio

An up-to-date NBT viewer and editor with lots of new features
521 stars 42 forks source link

Can not open .mcstructure files (anymore?) #23

Closed inxomnyaa closed 3 years ago

inxomnyaa commented 3 years ago

If i do remember correctly, in older versions this was working just fine, but i might confuse it with .structure files.

What i find weird is that it tries to load them as SNBT. It should be little endian

Here is a Go project in case you need to look up something about the format, since the MC Wiki is useless as always: https://github.com/df-mc/structure/blob/651c5d323dbfb24991dafdb72129e2a8a478a81b/structure.go#L23

File Version 1.15

Log:

1 file failed to load:

BelltowerWF.mcstructure

File did not begin with a '{'
Attempted to read past the end of the stream.
Region doesn't contain any chunks

Load as SNBT:
System.FormatException: File did not begin with a '{'
   at NbtStudio.NbtFile.CreateFromSnbt(String path)
   at NbtStudio.NbtFile.<>c__DisplayClass32_0.<TryCreateFromSnbt>b__0()
   at TryashtarUtils.Utility.Failable`1..ctor(Func`1 operation, String description)

Load as NBT (compression: AutoDetect, big endian: True, bedrock header: False):
System.IO.EndOfStreamException: Attempted to read past the end of the stream.
   at fNbt.NbtFile.DetectCompression(Stream stream)
   at fNbt.NbtFile.LoadFromStream(Stream stream, NbtCompression compression, TagSelector selector)
   at fNbt.NbtFile.LoadFromStream(Stream stream, NbtCompression compression)
   at NbtStudio.NbtFile.CreateFromNbt(String path, NbtCompression compression, Boolean big_endian, Boolean bedrock_header)
   at NbtStudio.NbtFile.<>c__DisplayClass34_0.<TryCreateFromNbt>b__0()
   at TryashtarUtils.Utility.Failable`1..ctor(Func`1 operation, String description)

Load as NBT (compression: AutoDetect, big endian: False, bedrock header: False):
System.IO.EndOfStreamException: Attempted to read past the end of the stream.
   at fNbt.NbtFile.DetectCompression(Stream stream)
   at fNbt.NbtFile.LoadFromStream(Stream stream, NbtCompression compression, TagSelector selector)
   at fNbt.NbtFile.LoadFromStream(Stream stream, NbtCompression compression)
   at NbtStudio.NbtFile.CreateFromNbt(String path, NbtCompression compression, Boolean big_endian, Boolean bedrock_header)
   at NbtStudio.NbtFile.<>c__DisplayClass34_0.<TryCreateFromNbt>b__0()
   at TryashtarUtils.Utility.Failable`1..ctor(Func`1 operation, String description)

Load as NBT (compression: AutoDetect, big endian: False, bedrock header: True):
System.IO.EndOfStreamException: Attempted to read past the end of the stream.
   at fNbt.NbtFile.DetectCompression(Stream stream)
   at fNbt.NbtFile.LoadFromStream(Stream stream, NbtCompression compression, TagSelector selector)
   at fNbt.NbtFile.LoadFromStream(Stream stream, NbtCompression compression)
   at NbtStudio.NbtFile.CreateFromNbt(String path, NbtCompression compression, Boolean big_endian, Boolean bedrock_header)
   at NbtStudio.NbtFile.<>c__DisplayClass34_0.<TryCreateFromNbt>b__0()
   at TryashtarUtils.Utility.Failable`1..ctor(Func`1 operation, String description)

Load as region file:
System.FormatException: Region doesn't contain any chunks
   at NbtStudio.RegionFile.Load()
   at NbtStudio.RegionFile..ctor(String path)
   at NbtStudio.RegionFile.<>c__DisplayClass35_0.<TryCreate>b__0()
   at TryashtarUtils.Utility.Failable`1..ctor(Func`1 operation, String description)
tryashtar commented 3 years ago

Um, unless the upload is wrong, that file is literally empty, so this is a correct error

inxomnyaa commented 3 years ago

🤦‍♂️ goodness me

Turns out i actually received the file broken like that on discord.

I guess i should've tested another file first ^^"

Thanks for figuring that out and sorry for the waste of time

tryashtar commented 3 years ago

Hehe no worries ;)