diff --git a/src/projectzombie/util/math/random/NoiseGeneratorSimplex.java b/src/projectzombie/util/math/random/NoiseGeneratorSimplex.java index 30ec9f2..9c858b5 100644 --- a/src/projectzombie/util/math/random/NoiseGeneratorSimplex.java +++ b/src/projectzombie/util/math/random/NoiseGeneratorSimplex.java @@ -6,24 +6,63 @@ import gl_engine.MathHelpers; public class NoiseGeneratorSimplex implements NoiseGenerator { - private OpenSimplexNoise simplex; + private OpenSimplexNoise[] simplex; private double off_x, off_y, off_z; - public NoiseGeneratorSimplex(Random rand) + public NoiseGeneratorSimplex(Random rand, int octaves) { - simplex = new OpenSimplexNoise(rand.nextLong()); + simplex = new OpenSimplexNoise[octaves]; off_x = MathHelpers.map(rand.nextDouble(), 0, 1, -1024, 1024); off_y = MathHelpers.map(rand.nextDouble(), 0, 1, -1024, 1024); off_z = MathHelpers.map(rand.nextDouble(), 0, 1, -1024, 1024); + + for(int i=0;i 0.45; } - if(noise_n > 80 || cavern) { + if(noise_n > noise_w || cavern) { chunk.setBackTile(floor.getDefaultState(), pos); } diff --git a/src/projectzombie/world/layer/layergen/LayerGenEarth.java b/src/projectzombie/world/layer/layergen/LayerGenEarth.java index 7ee781b..2fbaca2 100755 --- a/src/projectzombie/world/layer/layergen/LayerGenEarth.java +++ b/src/projectzombie/world/layer/layergen/LayerGenEarth.java @@ -67,13 +67,14 @@ public class LayerGenEarth extends LayerGen layer.noise_gens = new NoiseGenerator[] { - new NoiseGeneratorSimplex(rand), // Temperature - new NoiseGeneratorSimplex(rand), // Humidity + new NoiseGeneratorSimplex(rand, 64), // Temperature + new NoiseGeneratorSimplex(rand, 64), // Humidity new NoiseGeneratorSimplex(lrand), // Wind new NoiseGeneratorSimplex(lrand), // Wind - new NoiseGeneratorSimplex(lrand), // Water + new NoiseGeneratorSimplex(lrand, 4), // Water new NoiseGeneratorSimplex(lrand), // Rocks + new NoiseGeneratorSimplex(lrand), // Offset }; }