Fixed chaotic areas in limestone mountains

This commit is contained in:
Emmanuel BENOîT 2016-07-10 23:45:34 +02:00
parent a203d00cad
commit 07fc30e06f

View file

@ -68,13 +68,15 @@ public class WBLimestoneMountains
} }
this.generateBiomeTerrain( worldIn , rand , chunkPrimerIn , x , z , noiseVal ); this.generateBiomeTerrain( worldIn , rand , chunkPrimerIn , x , z , noiseVal );
if ( noiseVal < -1. && this.chaoticAreas ) { double gcn = GRASS_COLOR_NOISE.getValue( z / 32. , x / 32. );
this.genChaoticArea( rand , chunkPrimerIn , x , z ); if ( gcn > .25 && this.chaoticAreas ) {
this.genChaoticArea( rand , chunkPrimerIn , x , z , (int) ( ( gcn - .25 ) * 6 ) );
} }
} }
private void genChaoticArea( final Random rand , final ChunkPrimer chunkPrimerIn , final int x , final int z ) private void genChaoticArea( final Random rand , final ChunkPrimer chunkPrimerIn , final int x , final int z ,
int heightMax )
{ {
final int chunkX = x & 15 , chunkZ = z & 15; final int chunkX = x & 15 , chunkZ = z & 15;
final int groundY = this.findGround( chunkPrimerIn , chunkX , chunkZ ); final int groundY = this.findGround( chunkPrimerIn , chunkX , chunkZ );
@ -87,7 +89,7 @@ public class WBLimestoneMountains
return; return;
} }
final int topY = groundY + rand.nextInt( 3 ); final int topY = groundY + rand.nextInt( heightMax + 1 );
for ( int y = stoneY ; y <= topY ; y++ ) { for ( int y = stoneY ; y <= topY ; y++ ) {
final int v = rand.nextInt( 20 ); final int v = rand.nextInt( 20 );
IBlockState randBlock; IBlockState randBlock;