From 6ed70b38563a6c6e1e45d61d0f6847a1b5908504 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 31 Oct 2026 00:43:10 -0500 Subject: [PATCH] Keep the land biome under inland water above sea level The surface biome is typed from the ground height, so a pond or stream whose floor dips below the dimension's fluid height became the region's sea biome (ocean colours and ocean spawns in a small pond on low land). When the hydrology raster marks the column as inland water (pond, channel, cascade or waterfall; not a mouth or sea inlet) whose surface is above sea level, and the base biome is a land biome, keep that land biome. --- .../iris/generation/runtime/IrisComplex.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/art/arcane/iris/generation/runtime/IrisComplex.java b/core/src/main/java/art/arcane/iris/generation/runtime/IrisComplex.java index 4bb51ddaa..72fdc9caa 100644 --- a/core/src/main/java/art/arcane/iris/generation/runtime/IrisComplex.java +++ b/core/src/main/java/art/arcane/iris/generation/runtime/IrisComplex.java @@ -1721,9 +1721,14 @@ public class IrisComplex implements DataProvider { if (mapped != null) { return mapped; } + IrisBiome base = baseBiomeStream.get(x, z); + if (base.getInferredType() == InferredType.LAND && inlandWater(x, z)) { + // a pond or stream above sea level keeps the land around it, even where its floor dips below sea level + return base; + } return fixBiomeType( terrainHeight, - baseBiomeStream.get(x, z), + base, regionStream.get(x, z), x, z, @@ -1731,6 +1736,18 @@ public class IrisComplex implements DataProvider { ); } + private boolean inlandWater(double x, double z) { + int blockX = blockCoordinate(x); + int blockZ = blockCoordinate(z); + ChunkWaterRaster raster = hydrologyRasterAt(blockX, blockZ); + if (raster.empty()) { + return false; + } + WaterRole role = raster.role(blockX & 15, blockZ & 15); + return role.wet() && role != WaterRole.MOUTH && role != WaterRole.INLET + && raster.waterHead(blockX & 15, blockZ & 15) > transitionFluidHeight(x, z, fluidHeight); + } + private IrisBiome hydrologyShoreBiome(double terrainHeight, double x, double z) { int blockX = blockCoordinate(x); int blockZ = blockCoordinate(z);