Replaced spaces, proper biome getter, imports cleanup
This commit is contained in:
parent
91e7bab993
commit
58310d020c
26 changed files with 979 additions and 981 deletions
|
@ -9,21 +9,21 @@ import ru.betterend.noise.OpenSimplexNoise;
|
|||
* Noise source that returns a value in [0, 4]
|
||||
*/
|
||||
public class UmbraSurfaceNoiseCondition implements NumericProvider {
|
||||
private static final OpenSimplexNoise NOISE = new OpenSimplexNoise(1512);
|
||||
private static final OpenSimplexNoise NOISE = new OpenSimplexNoise(1512);
|
||||
|
||||
@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.4) return 0;
|
||||
if (value > 0.15) return 1;
|
||||
if (value > -0.15) return 2;
|
||||
if (value > -0.4) return 3;
|
||||
return 4;
|
||||
}
|
||||
@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.4) return 0;
|
||||
if (value > 0.15) return 1;
|
||||
if (value > -0.15) return 2;
|
||||
if (value > -0.4) return 3;
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue