Replace continent renderer with bridgeStream

This commit is contained in:
CocoTheOwner 2023-02-17 11:25:26 +01:00
parent 131c4692bc
commit 23cd5c117b

View File

@ -49,14 +49,13 @@ public class IrisRenderer {
colorFunction = (x, z) -> renderer.getComplex().getCaveBiomeStream().get(x, z).getColor(renderer, currentType).getRGB();
case HEIGHT ->
colorFunction = (x, z) -> Color.getHSBColor(renderer.getComplex().getHeightStream().get(x, z).floatValue(), 100, 100).getRGB();
case CONTINENT -> {
double fluidHeight = renderer.getComplex().getFluidHeight();
int deltaHeight = renderer.getMaxHeight() - renderer.getMinHeight();
colorFunction = (x, z) -> {
double h = renderer.getComplex().getHeightStream().get(x, z);
return new Color((int) (h * 255d / deltaHeight), 128, h > fluidHeight ? 0 : 255).getRGB();
};
}
case CONTINENT ->
colorFunction = (x, z) -> (switch (renderer.getComplex().getBridgeStream().get(x, z)) {
case SHORE -> Color.YELLOW;
case LAND -> Color.GREEN;
case SEA -> Color.BLUE;
case CAVE -> Color.BLACK;
}).getRGB();
}
double x, z;