added fastbridge terrain generator

This commit is contained in:
2025-09-19 21:41:01 +02:00
parent e6bded1c9e
commit e4fff421f5
4 changed files with 31 additions and 20 deletions

View File

@@ -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;
}
}