Recipe fixes, replaced spaces with tabs

This commit is contained in:
paulevsGitch 2021-12-15 13:08:15 +03:00
parent 5ca6a92dd0
commit d8de624fd1
60 changed files with 1816 additions and 1851 deletions

View file

@ -6,29 +6,29 @@ import ru.bclib.noise.OpenSimplexNoise;
import ru.bclib.util.MHelper;
public class DoubleBlockSurfaceNoiseCondition extends SurfaceNoiseCondition {
public static final DoubleBlockSurfaceNoiseCondition CONDITION = new DoubleBlockSurfaceNoiseCondition(0);
private static final OpenSimplexNoise NOISE = new OpenSimplexNoise(4141);
public static final DoubleBlockSurfaceNoiseCondition CONDITION = new DoubleBlockSurfaceNoiseCondition(0);
private static final OpenSimplexNoise NOISE = new OpenSimplexNoise(4141);
private final double threshold;
public DoubleBlockSurfaceNoiseCondition(double threshold){
this.threshold = threshold;
}
private final double threshold;
public DoubleBlockSurfaceNoiseCondition(double threshold){
this.threshold = threshold;
}
private static int lastX = Integer.MIN_VALUE;
private static int lastZ = Integer.MIN_VALUE;
private static double lastValue = 0;
private static int lastX = Integer.MIN_VALUE;
private static int lastZ = Integer.MIN_VALUE;
private static double lastValue = 0;
@Override
public boolean test(SurfaceRulesContextAccessor context) {
final int x = context.getBlockX();
final int z = context.getBlockZ();
if (lastX==x && lastZ==z) return lastValue > threshold;
@Override
public boolean test(SurfaceRulesContextAccessor context) {
final int x = context.getBlockX();
final int z = context.getBlockZ();
if (lastX==x && lastZ==z) return lastValue > threshold;
double value = NOISE.eval(x * 0.1, z * 0.1) + MHelper.randRange(-0.4, 0.4, MHelper.RANDOM);
double value = NOISE.eval(x * 0.1, z * 0.1) + MHelper.randRange(-0.4, 0.4, MHelper.RANDOM);
lastX=x;
lastZ=z;
lastValue=value;
return value > threshold;
}
lastX=x;
lastZ=z;
lastValue=value;
return value > threshold;
}
}