Minecraft broken level dat

minecraft-java-edition

While i was playing minecraft (using linux) the power went out and turned the computer off, when i turned it back on i brought minecraft (Feed the beast mod packs) back up and i noticed it all the "news" was restarted, i launched minecraft and my save was gone so i checked the files and i found that instead of the level .dat being a package it was a document.

Does anyone know how to fix the level dat?

Best Answer

"fixing" a corrupt file for the purpose of minecraft is near impossible.

If you wish to try and salvage your save and read what is left:

  1. change the extension of the document back to .dat
  2. follow SevenSidedDie's advice and use NBT Explorer to parse the file

if NBT cannot read anything legible, the file may be beyond repair.

if NBT can read it, you can copy information from it to a new save (such as inventory items / settings)

I know this isn't excactly what you want to hear but I hope it helps, Good luck :)