Replaced spaces, proper biome getter, imports cleanup

This commit is contained in:
paulevsGitch 2021-12-21 18:06:48 +03:00
parent 91e7bab993
commit 58310d020c
26 changed files with 979 additions and 981 deletions

View file

@ -9,20 +9,20 @@ import ru.betterend.noise.OpenSimplexNoise;
* Noise source that returns a value in [0, 3]
*/
public class SulphuricSurfaceNoiseCondition implements NumericProvider {
private static final OpenSimplexNoise NOISE = new OpenSimplexNoise(5123);
private static final OpenSimplexNoise NOISE = new OpenSimplexNoise(5123);
@Override
public int getNumber(SurfaceRulesContextAccessor context) {
final int x = context.getBlockX();
final int z = context.getBlockZ();
final double value = NOISE.eval(x * 0.03, z * 0.03) + NOISE.eval(x * 0.1, z * 0.1) * 0.3 + MHelper.randRange(
-0.1,
0.1,
MHelper.RANDOM
);
if (value < -0.6) return 0;
if (value < -0.3) return 1;
if (value < -0.5) return 2;
return 3;
}
@Override
public int getNumber(SurfaceRulesContextAccessor context) {
final int x = context.getBlockX();
final int z = context.getBlockZ();
final double value = NOISE.eval(x * 0.03, z * 0.03) + NOISE.eval(x * 0.1, z * 0.1) * 0.3 + MHelper.randRange(
-0.1,
0.1,
MHelper.RANDOM
);
if (value < -0.6) return 0;
if (value < -0.3) return 1;
if (value < -0.5) return 2;
return 3;
}
}