I'm trying to build my UHC mod, and I have the code that generates the bedrock wall working nearly perfectly. But it seems like somehow some of the chunk population is running after my code, even though I'm running it in the PopulateChunkEvent.Post event handler.
Here's the file that's running my actual generation: http://bit.ly/1zdQDvE
I've triple-checked that I'm only replacing blocks that are in the current chunk, at least for the wall itself. It's possible that the 'starting area' platform is less well behaved, but that code is all getting replaced soon anyway. Lines 24-72 should be the relevant code. The problem is that lakes and mineshafts have a tendency to punch holes in the bedrock wall, as if they are generating after the wall, even though they should all be executing first.
Edit:
Well, I've now attempted to reject any terrain decoration in chunks that contain my wall, with no effect (so I'm probably doing it wrong), and giving my event handler the Lowest priority, so it should run last, with no effect.
I'm out of ideas, and going to bed for the night.