Step-pool review fixes

- Floor non-estuary pools at the lowest grade whose snapped head is above the sea
- Add WaterHeads.lowestAboveSea beside the snap rule it follows
- Restore the strict delta branch check on grouped settings
- Assert grouping moves no sea-level head upstream on the delta fixture
- Update the cascades schema description and recapture the schema digest
- Measure pools by arc on a gentler run
- Test close falls stay separate when the lower lands on the end level
This commit is contained in:
Brian Fopiano committed 2026-11-02 17:27:15 -05:00
1 parent 394eb6b8c1
commit 618a52952d
6 files changed
+65 -11

No files matched your search

@@ -44,7 +44,7 @@ public class IrisHydrologyTier {
@Description("Blocks the water surface sits below the ground it flows through.")
private int inset = 1;
@Description("Keeps drops shorter than a waterfall as stepped cascades. When false, drops are spread into a gentler slope where the terrain allows, including the step where a channel joins lower water; drops that cannot be spread, such as a junction right below a pond outlet, stay as small cascades below the waterfall minimum.")
@Description("Groups the drops of a run into step-pools: the drops within 2.5 to 5 channel widths, from 6 to 32 blocks, join into one step of up to waterfallMinimumDrop plus 2 blocks, and that limit ends the group early on steep ground. When false, drops are spread into a gentler slope where the terrain allows, including the step where a channel joins lower water; drops that cannot be spread, such as a junction right below a pond outlet, stay as small cascades below the waterfall minimum.")
private boolean cascades = true;
@MinNumber(2)
@@ -1,10 +1,16 @@
package art.arcane.iris.generation.hydrology.raster;
public final class WaterHeads {
private static final int STEP = 2;
private WaterHeads() {
}
public static int snap(int planned, int seaLevel) {
return planned - Math.floorMod(planned - seaLevel, 2);
return planned - Math.floorMod(planned - seaLevel, STEP);
}
public static int lowestAboveSea(int seaLevel) {
return seaLevel + STEP;
}
}
@@ -1,5 +1,7 @@
package art.arcane.iris.generation.hydrology.water;
import art.arcane.iris.generation.hydrology.raster.WaterHeads;
import java.util.Arrays;
import java.util.List;
@@ -63,7 +65,7 @@ final class ReachGrader {
}
int cap = draft.ocean[point] ? seaLevel : draft.target[point] + MAX_POOL;
int floor = lakeFloor[index] ? draft.floor : Math.max(seaLevel, Math.min(draft.floor, (int) Math.floor(draft.bank[point]) + maxFill));
floors[point] = draft.ocean[point] ? floor : Math.max(floor, seaLevel + 1);
floors[point] = draft.ocean[point] ? floor : Math.max(floor, WaterHeads.lowestAboveSea(seaLevel));
level = Math.min(level, Math.max(floor, Math.min(grade[point], cap)));
grade[point] = level;
}