Ok, so I finally got around to creating a program that can write to MCA (region files). This was a LOT more difficult than the previous Minecraft level editor I made, as I had to deal with multiple layers (NBT recursive tags, ZLib compression, multiple calculations to get the chunk and block coordinates, and a sort of directory structure to hold everything). There are MANY places that this could have gone wrong, but at first it didn't seem that it did. I was able to load the r.0.0.mca file without any errors in the NBT Explorer software. So I thought everything was fine. But then when I copied this region file into the saves region subfolder of one of my gamesaves, and replaced the previous file of the same name, when I tried to play it in Minecraft, It refused to load it. The console showed a ton of errors. Here's a few lines of errors, just a sample of the full error set.
[03:49:04] [Server thread/ERROR]: Chunk file at 6,2 is missing level data, skipping
[03:49:04] [Server thread/ERROR]: Chunk file at 6,3 is missing level data, skipping
[03:49:04] [Server thread/ERROR]: Chunk file at 6,4 is missing level data, skipping
[03:49:04] [Server thread/ERROR]: Chunk file at 6,5 is missing level data, skipping
And here's a link to download the region file, so that if some uber Minecraft hacker/modder/toolmaker on here wants to take a look at the file and try to debug it, they will be able to do so. I hope that something in this file will indicate the exact nature of this problem, and that it will turn out to be a common one that most people have run into the first time they've tried to make a Minecraft level editor software, with a simple solution to fix it. This is the exact file, as output by my program, without having ever been played in Minecraft (and therefore has not been re-saved by the game). http://www.mediafire.com/download/39ua3wd1c1zquz4/r.0.0.mca
Why did this get moved to Mods Discussion? It is a question, involving a piece of software that I'm working on creating (not a mod to the Minecraft Jar or any other file in the game itself), in other words, a "tool". So the Minecraft tools section of this forum makes most sense.