Program: 166036
Project: 166036
Buggy source:
/** 
 * Will return back a chunk, if it doesn't exist and its not a MP client it will generates all the blocks for the specified chunk from the map seed and chunk seed
 */
@Override public Chunk provideChunk(int chunkX,int chunkZ){
  this.rand.setSeed(chunkX * 341873128712L + chunkZ * 132897987541L + 123456);
  Block[] ablock=new Block[65536];
  byte[] abyte=new byte[65536];
  BaseTerrainGenerator terrainGenerator=terrainGeneratorMap.get(dimensionInformation.getTerrainType());
  this.biomesForGeneration=this.worldObj.getWorldChunkManager().getBiomesForGeneration(this.biomesForGeneration,chunkX * 4 - 2,chunkZ * 4 - 2,10,10);
  terrainGenerator.generate(chunkX,chunkZ,ablock,abyte);
  this.biomesForGeneration=this.worldObj.getWorldChunkManager().loadBlockGeneratorData(this.biomesForGeneration,chunkX * 16,chunkZ * 16,16,16);
  terrainGenerator.replaceBlocksForBiome(chunkX,chunkZ,ablock,abyte,this.biomesForGeneration);
  if (dimensionInformation.hasFeatureType(FeatureType.FEATURE_TENDRILS)) {
    this.tendrilGenerator.generate(this.worldObj,chunkX,chunkZ,ablock,abyte);
  }
  if (dimensionInformation.hasFeatureType(FeatureType.FEATURE_CANYONS)) {
    this.canyonGenerator.generate(this.worldObj,chunkX,chunkZ,ablock,abyte);
  }
  if (dimensionInformation.hasFeatureType(FeatureType.FEATURE_ORBS)) {
    this.sphereGenerator.generate(this.worldObj,chunkX,chunkZ,ablock,abyte);
  }
  if (dimensionInformation.hasFeatureType(FeatureType.FEATURE_LIQUIDORBS)) {
    this.liquidSphereGenerator.generate(this.worldObj,chunkX,chunkZ,ablock,abyte);
  }
  if (dimensionInformation.hasFeatureType(FeatureType.FEATURE_CAVES)) {
    this.caveGenerator.func_151539_a(this,this.worldObj,chunkX,chunkZ,ablock);
  }
  if (dimensionInformation.hasFeatureType(FeatureType.FEATURE_RAVINES)) {
    this.ravineGenerator.func_151539_a(this,this.worldObj,chunkX,chunkZ,ablock);
  }
  if (dimensionInformation.hasStructureType(StructureType.STRUCTURE_MINESHAFT)) {
    this.mineshaftGenerator.func_151539_a(this,this.worldObj,chunkX,chunkZ,ablock);
  }
  if (dimensionInformation.hasStructureType(StructureType.STRUCTURE_VILLAGE)) {
    this.villageGenerator.func_151539_a(this,this.worldObj,chunkX,chunkZ,ablock);
  }
  if (dimensionInformation.hasStructureType(StructureType.STRUCTURE_STRONGHOLD)) {
    this.strongholdGenerator.func_151539_a(this,this.worldObj,chunkX,chunkZ,ablock);
  }
  if (dimensionInformation.hasStructureType(StructureType.STRUCTURE_FORTRESS)) {
    this.genNetherBridge.func_151539_a(this,this.worldObj,chunkX,chunkZ,ablock);
  }
  if (dimensionInformation.hasStructureType(StructureType.STRUCTURE_SCATTERED)) {
    this.scatteredFeatureGenerator.func_151539_a(this,this.worldObj,chunkX,chunkZ,ablock);
  }
  Chunk chunk=new Chunk(this.worldObj,ablock,abyte,chunkX,chunkZ);
  byte[] abyte1=chunk.getBiomeArray();
  for (int k=0; k < abyte1.length; ++k) {
    abyte1[k]=(byte)this.biomesForGeneration[k].biomeID;
  }
  chunk.generateSkylightMap();
  return chunk;
}

Fixed version (ground truth):
/** 
 * Will return back a chunk, if it doesn't exist and its not a MP client it will generates all the blocks for the specified chunk from the map seed and chunk seed
 */
@Override public Chunk provideChunk(int chunkX,int chunkZ){
  this.rand.setSeed(chunkX * 341873128712L + chunkZ * 132897987541L + 123456);
  Block[] ablock=new Block[65536];
  byte[] abyte=new byte[65536];
  this.biomesForGeneration=this.worldObj.getWorldChunkManager().getBiomesForGeneration(this.biomesForGeneration,chunkX * 4 - 2,chunkZ * 4 - 2,10,10);
  terrainGenerator.generate(chunkX,chunkZ,ablock,abyte);
  this.biomesForGeneration=this.worldObj.getWorldChunkManager().loadBlockGeneratorData(this.biomesForGeneration,chunkX * 16,chunkZ * 16,16,16);
  terrainGenerator.replaceBlocksForBiome(chunkX,chunkZ,ablock,abyte,this.biomesForGeneration);
  if (dimensionInformation.hasFeatureType(FeatureType.FEATURE_TENDRILS)) {
    this.tendrilGenerator.generate(this.worldObj,chunkX,chunkZ,ablock,abyte);
  }
  if (dimensionInformation.hasFeatureType(FeatureType.FEATURE_CANYONS)) {
    this.canyonGenerator.generate(this.worldObj,chunkX,chunkZ,ablock,abyte);
  }
  if (dimensionInformation.hasFeatureType(FeatureType.FEATURE_ORBS)) {
    this.sphereGenerator.generate(this.worldObj,chunkX,chunkZ,ablock,abyte);
  }
  if (dimensionInformation.hasFeatureType(FeatureType.FEATURE_LIQUIDORBS)) {
    this.liquidSphereGenerator.generate(this.worldObj,chunkX,chunkZ,ablock,abyte);
  }
  if (dimensionInformation.hasFeatureType(FeatureType.FEATURE_CAVES)) {
    this.caveGenerator.func_151539_a(this,this.worldObj,chunkX,chunkZ,ablock);
  }
  if (dimensionInformation.hasFeatureType(FeatureType.FEATURE_RAVINES)) {
    this.ravineGenerator.func_151539_a(this,this.worldObj,chunkX,chunkZ,ablock);
  }
  if (dimensionInformation.hasStructureType(StructureType.STRUCTURE_MINESHAFT)) {
    this.mineshaftGenerator.func_151539_a(this,this.worldObj,chunkX,chunkZ,ablock);
  }
  if (dimensionInformation.hasStructureType(StructureType.STRUCTURE_VILLAGE)) {
    this.villageGenerator.func_151539_a(this,this.worldObj,chunkX,chunkZ,ablock);
  }
  if (dimensionInformation.hasStructureType(StructureType.STRUCTURE_STRONGHOLD)) {
    this.strongholdGenerator.func_151539_a(this,this.worldObj,chunkX,chunkZ,ablock);
  }
  if (dimensionInformation.hasStructureType(StructureType.STRUCTURE_FORTRESS)) {
    this.genNetherBridge.func_151539_a(this,this.worldObj,chunkX,chunkZ,ablock);
  }
  if (dimensionInformation.hasStructureType(StructureType.STRUCTURE_SCATTERED)) {
    this.scatteredFeatureGenerator.func_151539_a(this,this.worldObj,chunkX,chunkZ,ablock);
  }
  Chunk chunk=new Chunk(this.worldObj,ablock,abyte,chunkX,chunkZ);
  byte[] abyte1=chunk.getBiomeArray();
  for (int k=0; k < abyte1.length; ++k) {
    abyte1[k]=(byte)this.biomesForGeneration[k].biomeID;
  }
  chunk.generateSkylightMap();
  return chunk;
}