Resurface shallow tidal banks

- Keep the biome surface layer on tidal bank cuts of 6 blocks or less
This commit is contained in:
Brian Fopiano committed 2026-11-03 19:50:33 -05:00
1 parent 8189215328
commit ab3e22c619
3 files changed
+25

No files matched your search

@@ -140,6 +140,22 @@ public class IrisTerrainNormalActuatorHydrologyTest {
assertSame("a slot cut through the cliff shows the strata below the old surface", cliff.dirt, cliff.paint().get(0, GROUND, 0));
}
@Test
public void shallowTidalBankCutsKeepTheBiomeSurfaceLayer() {
Painter cut = new Painter(WaterRole.BANK, 0);
when(cut.complex.naturalTrueHeight(11, -4)).thenReturn(GROUND + 3);
NativeBlockState stripped = cut.paint().get(0, GROUND, 0);
Painter tidal = new Painter(WaterRole.BANK, 0);
when(tidal.complex.naturalTrueHeight(11, -4)).thenReturn(GROUND + 3);
when(tidal.complex.isTidalBank(11, -4)).thenReturn(true);
assertSame("the shallow tidal cut is resurfaced", tidal.grass, tidal.paint().get(0, GROUND, 0));
assertSame("a river bank keeps its strata", cut.dirt, stripped);
Painter deep = new Painter(WaterRole.BANK, 0);
when(deep.complex.naturalTrueHeight(11, -4)).thenReturn(GROUND + 20);
when(deep.complex.isTidalBank(11, -4)).thenReturn(true);
assertSame("a deep tidal cut shows the strata", deep.dirt, deep.paint().get(0, GROUND, 0));
}
@Test
public void openInletSlotsKeepLiquidWaterUnderOnlyTheTopSeaLayer() {
Painter slot = new Painter(WaterRole.INLET, HEAD);