-
Notifications
You must be signed in to change notification settings - Fork 228
Recovering corrupt NBT files (MCA Schematic etc.)
Note: Please contact me (ticket, discord etc.) if you need help recovering files.
If a file in NBT format is partially corrupt, some data can often be recovered. So long as the compression header is intact (if it's a compressed file) and a tag's name is still intact. For GZIP, the compression trailer does not need to be present.
Included in FAWE is the CorruptSchematicReader for recovering corrupt schematic, however the method can be adapted for MCA files or other NBT based formats.
Here is a snippet where it matches the Width
tag and sets the width variable.
match("Width", new CorruptSchematicStreamer.CorruptReader() {
@Override
public void run(DataInputStream in) throws IOException {
width.set(in.readShort());
}
});
There's also a method where it tries to guess the schematic dimensions based on the data length if some of the dimension tags are missing: Vector guessDimensions(int volume, int width, int height, int length)
This wiki is outdated, move to https://github.com/IntellectualSites/FastAsyncWorldEdit-Documentation/
This Wiki is for Legacy Versions (1.8 - 1.12.2). Check here for 1.13+ versions: https://github.com/IntellectualSites/FastAsyncWorldEdit-Documentation/