Open JERisBRISK opened 5 years ago
Try this:
var file = new NbtFile();
file.BigEndian = false;
byte[] data = File.ReadAllBytes(levelDatFile);
file.LoadFromBuffer(data, 8, data.Length - 8, NbtCompression.None);
Try this:
var file = new NbtFile(); file.BigEndian = false; byte[] data = File.ReadAllBytes(levelDatFile); file.LoadFromBuffer(data, 8, data.Length - 8, NbtCompression.None);
How do i save the file then?
I just tried using fNbt to load the level.dat file for a Minecraft Windows 10 Edition save and was met with two exceptions.
The first was that it was unable to detect the compression format:
I tried to remedy that by explicitly calling
nbtFile.LoadFromFile(levelDatFile, NbtCompression.None, null)
. This worked, but the next error I encountered was:So, whatever Mojang did for the Windows 10 Edition of Minecraft seems to have introduced some compatibility issues with fNbt.