Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ public ImportHeightMapOp withUpperBuildLimit(int upperBuildLimit) {
return this;
}

public ImportHeightMapOp withVoidBelowLevel(int voidBelowLevel) {
this.voidBelowLevel = voidBelowLevel;
return this;
}

@Override
public World2 go() throws ScriptException {
goCalled();
Expand Down Expand Up @@ -164,6 +169,10 @@ public World2 go() throws ScriptException {
}
importer.setMinHeight(minHeight);
importer.setMaxHeight(maxHeight);
if(voidBelowLevel != Integer.MIN_VALUE) {
importer.setVoidBelowLevel(voidBelowLevel);
importer.setVoidBelow(true);
}

HeightMapTileFactory tileFactory = TileFactoryFactory.createNoiseTileFactory(new Random().nextLong(), Terrain.GRASS, minHeight, maxHeight, 58, waterLevel, false, true, 20, 1.0);
Theme defaults = Configuration.getInstance().getHeightMapDefaultTheme();
Expand All @@ -189,6 +198,6 @@ public World2 go() throws ScriptException {
private final HeightMapImporter importer = new HeightMapImporter();
private BitmapHeightMap heightMap;
private boolean fromLevelsSpecified, toLevelsSpecified;
private int scale = 100, waterLevel = DEFAULT_WATER_LEVEL, offsetX, offsetY, lowerBuildLimit = Integer.MIN_VALUE, upperBuildLimit = Integer.MAX_VALUE;
private int scale = 100, waterLevel = DEFAULT_WATER_LEVEL, offsetX, offsetY, lowerBuildLimit = Integer.MIN_VALUE, upperBuildLimit = Integer.MAX_VALUE, voidBelowLevel = Integer.MIN_VALUE;
private Platform platform = Configuration.getInstance().getDefaultPlatform();
}