added fastbridge terrain generator
This commit is contained in:
@@ -21,6 +21,7 @@ public class ValeGenerator extends HeightTerrainGenerator {
|
||||
.build();
|
||||
|
||||
private Function<Integer, Double> xShiftMultiplier = multiplier -> 1d;
|
||||
private Function<Integer, Double> xShiftOffset = z -> 0d;
|
||||
|
||||
public ValeGenerator() {
|
||||
setCalculateHeight(this::calculateY);
|
||||
@@ -32,10 +33,14 @@ public class ValeGenerator extends HeightTerrainGenerator {
|
||||
}
|
||||
|
||||
public int getXShiftAtZ(int z) {
|
||||
return (int) ((curves.getNoise(z) * 32 + largeCurves.getNoise(z) * 64) * xShiftMultiplier.apply(z));
|
||||
return (int) ((curves.getNoise(z) * 32 + largeCurves.getNoise(z) * 64) * xShiftMultiplier.apply(z) + xShiftOffset.apply(z));
|
||||
}
|
||||
|
||||
public void setXShiftMultiplier(Function<Integer, Double> xShiftMultiplier) {
|
||||
this.xShiftMultiplier = xShiftMultiplier;
|
||||
}
|
||||
|
||||
public void setXShiftOffset(Function<Integer, Double> xShiftOffset) {
|
||||
this.xShiftOffset = xShiftOffset;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user