Update to latest Gaea, allow configuration of terrain octaves/frequency

This commit is contained in:
dfsek
2020-10-17 16:49:43 -07:00
parent 2c49160731
commit 2741a761a0
32 changed files with 136 additions and 111 deletions

View File

@@ -1,16 +1,17 @@
package com.dfsek.terra.biome;
import org.polydev.gaea.math.FastNoise;
import org.polydev.gaea.math.FastNoiseLite;
/**
* Class to hold noise function to determine erosion.
*/
public class ErosionNoise {
private final double thresh;
private final FastNoise noise;
private final FastNoiseLite noise;
public ErosionNoise(float freq1, double thresh, int octaves, long seed) {
FastNoise main = new FastNoise((int) (seed+1));
main.setNoiseType(FastNoise.NoiseType.SimplexFractal);
FastNoiseLite main = new FastNoiseLite((int) (seed+1));
main.setNoiseType(FastNoiseLite.NoiseType.OpenSimplex2);
main.setFractalType(FastNoiseLite.FractalType.FBm);
main.setFractalOctaves(octaves);
main.setFrequency(freq1);
this.thresh = thresh;