9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-22 16:49:14 +00:00

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