getNoiseSeeded -> noise

This commit is contained in:
dfsek
2021-11-27 08:25:14 -07:00
parent bfee773229
commit 2aa9c86499
22 changed files with 63 additions and 65 deletions
@@ -46,8 +46,8 @@ public class BiomePipelineProvider implements BiomeProvider {
@Override
public TerraBiome getBiome(int x, int z, long seed) {
x += mutator.getNoiseSeeded(seed + 1, x, z) * noiseAmp;
z += mutator.getNoiseSeeded(seed + 2, x, z) * noiseAmp;
x += mutator.noise(seed + 1, x, z) * noiseAmp;
z += mutator.noise(seed + 2, x, z) * noiseAmp;
x = FastMath.floorToInt(FastMath.floorDiv(x, resolution));
@@ -82,9 +82,8 @@ public class BiomePipelineProvider implements BiomeProvider {
@Override
public boolean equals(Object obj) {
if(!(obj instanceof SeededVector)) return false;
SeededVector that = (SeededVector) obj;
if(!(obj instanceof SeededVector that)) return false;
return this.seed == that.seed && this.x == that.x && this.z == that.z;
}
}
@@ -22,6 +22,6 @@ public class FractalExpander implements BiomeExpander {
@Override
public TerraBiome getBetween(double x, double z, long seed, TerraBiome... others) {
return others[MathUtil.normalizeIndex(sampler.getNoiseSeeded(seed, x, z), others.length)];
return others[MathUtil.normalizeIndex(sampler.noise(seed, x, z), others.length)];
}
}
@@ -35,7 +35,7 @@ public class SmoothMutator implements BiomeMutator {
boolean horiz = Objects.equals(left, right) && left != null;
if(vert && horiz) {
return MathUtil.normalizeIndex(sampler.getNoiseSeeded(seed, x, z), 2) == 0 ? left : top;
return MathUtil.normalizeIndex(sampler.noise(seed, x, z), 2) == 0 ? left : top;
}
if(vert) return top;