RealChunk realChunk = new RealChunk(chunkGen, chunk);
// figure out what everything looks like
PlatMap platmap = chunkGen.getPlatMap(chunkX, chunkZ);
if (platmap != null) {
platmap.generateBlocks(realChunk);
// finalize things
chunkGen.lootProvider.saveLoots();
// Originally by Sablednah