question: private void biomeFactor ( final int x , final int z , final double addHeight ) { float smoothVolatility = 0.0F ; float smoothHeight = 0.0F ; float biomeWeightSum = 0.0F ; final Biome centerBiomeConfig = getCenterBiome ( x , z ) ; final int lookRadius = this . maxSmoothRadius ; for ( int nextX = - lookRadius ; nextX <= lookRadius ; nextX ++ ) { for ( int nextZ = - lookRadius ; nextZ <= lookRadius ; nextZ ++ ) { final Biome biome = getOffsetBiome ( x , z , nextX , nextZ ) ; final float biomeHeight = biome . getBaseHeight ( ) ; final float biomeVolatility = biome . getHeightVariation ( ) ; double biomeWeight = calcBiomeWeight ( nextX , nextZ , biomeHeight ) ; biomeWeight = Math . abs ( biomeWeight ) ; if ( biomeHeight > centerBiomeConfig . getBaseHeight ( ) ) { biomeWeight /= 2.0F ; } smoothVolatility += biomeVolatility * biomeWeight ; smoothHeight += biomeHeight * biomeWeight ; biomeWeightSum += biomeWeight ; } } smoothVolatility /= biomeWeightSum ; smoothHeight /= biomeWeightSum ; this . biomeVolatility = smoothVolatility * 0.9 + 0.1 ; this . biomeVolatility *= 4.0 / 3.0 ; this . biomeHeight = 0.75 / 64.0 ; this . biomeHeight += smoothHeight * 17.0 / 64.0 ; this . biomeHeight += 0.2 * addHeight * 17.0 / 64.0 ; }
target:  Calculates biome height and volatility and adds addHeight to result. <p> It converts vanilla biome values to some more predictable format: <p> biome volatility == 0 will generate flat generator <p> biome volatility == 0.5 means that max difference between the actual height and average height is 0.5 of max generation height from sea level. High volatility will generate overhangs <p> biome height == 0 will generate generator at sea level <p> biome height == 1 will generate generator will generate at max generation height above sea level. <p> Volatility Note: Terrain below biome height has volatility divided by 4, probably to add some flat generator to mountanious biomes