From 07fc30e06fa48c5353f6a3312ac216dddf891d66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Sun, 10 Jul 2016 23:45:34 +0200 Subject: [PATCH] Fixed chaotic areas in limestone mountains --- src/java/mmm/world/biome/WBLimestoneMountains.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/java/mmm/world/biome/WBLimestoneMountains.java b/src/java/mmm/world/biome/WBLimestoneMountains.java index d3d22fc..17a50cb 100644 --- a/src/java/mmm/world/biome/WBLimestoneMountains.java +++ b/src/java/mmm/world/biome/WBLimestoneMountains.java @@ -68,13 +68,15 @@ public class WBLimestoneMountains } this.generateBiomeTerrain( worldIn , rand , chunkPrimerIn , x , z , noiseVal ); - if ( noiseVal < -1. && this.chaoticAreas ) { - this.genChaoticArea( rand , chunkPrimerIn , x , z ); + double gcn = GRASS_COLOR_NOISE.getValue( z / 32. , x / 32. ); + 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 groundY = this.findGround( chunkPrimerIn , chunkX , chunkZ ); @@ -87,7 +89,7 @@ public class WBLimestoneMountains return; } - final int topY = groundY + rand.nextInt( 3 ); + final int topY = groundY + rand.nextInt( heightMax + 1 ); for ( int y = stoneY ; y <= topY ; y++ ) { final int v = rand.nextInt( 20 ); IBlockState randBlock;