Minecraft-Region-Fixer icon indicating copy to clipboard operation
Minecraft-Region-Fixer copied to clipboard

Suggestion: NBT Type checking

Open LothusMarque opened this issue 12 years ago • 3 comments

Somehow or other, a bunch of my chunks ended up with bad NBT data - specifically, the HeightMap entry was an array of BYTES, not integer. Since it was technically readable data, this tool passed this issue without trouble, but the server crashed on reading it with a corrupt NBT exception.

It might be a good idea to do some basic NBT entry type checking along the way, considering this particular issue... I have no idea how it happened to my map, but it did.

LothusMarque avatar Jun 04 '13 20:06 LothusMarque

Thanks you very much for the very clear suggestion.

Is not the first time I think to implement something like that but seeing how the nbt structure can change from moded maps to vanilla maps discourages me (region-fixer works pretty well with moded maps right now). This and the endless stream of updates of Minecraft makes me feel like if I implemnt this, I'm going to spend a lot of time following all the changes instead of bugfixing/adding new stuff.

But you have a point there, chunk structure is probably not going to change in a long time. Could you send me one of those region files? I can't promise I'm going to implement this... but who knows.

Thanks again to take the time to report the results of your research!

(note: I've read also the minecraft forums post, no problem!)

Fenixin avatar Jun 04 '13 20:06 Fenixin

Maybe there could be an argument that takes a small config file listing entries and their expected types and/or a default basic set? Anything not listed in the file would be ignored and handled the way it does now. That way people could tweak it to their needs for whatever mods they're using, should something like this show up again. Not entirely certain how to send you a region file directly through Github, so hopefully this should suffice: http://mercenary-enclave.com/dump/r.-2.1.zip This particular region file has several chunks with the array type mismatch... it's from my server before I repaired it, and is from an End map, if that makes any difference.

I appreciate you looking into this, even if there are no guarantees anywhere. :)

LothusMarque avatar Jun 05 '13 04:06 LothusMarque

The region file is downloaded, thanks again. I'm going to be a week or so really busy, after that I hope to have some time to do stuff in region-fixer.

Fenixin avatar Jun 05 '13 06:06 Fenixin