mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-12-03 03:31:32 +00:00
Fall and estuary check fixes
- missingSurface: a sea-floor head under sea layers or sea decoration holds its cover or its own planned fluid, so a wrong fluid at a frozen estuary or inlet head fails again (R76). - Column parity test mirrors the open-water-under-a-fall rule with a random 4-neighbour of its own head and role, guarding the actuator against drift from the mantle fall rule. - An inlet mouth under a fall keeps open sea water, and one without a fall keeps its sea layers. - bermOverCap still counts an over-cap wall beside a lake's outlet, which is never held.
This commit is contained in:
1 parent
6f3b96cfb3
commit
a21e59f53b
5 files changed
+86
-13
No files matched your search
@@ -27,6 +27,7 @@ final class HydrologyVoxels {
|
||||
static final byte CANE = 2;
|
||||
static final byte WATER = 16;
|
||||
static final byte LAVA = 32;
|
||||
static final byte SEA_COVER = 64;
|
||||
static final int NO_WATER = Integer.MIN_VALUE;
|
||||
static final int COLUMNS = 256;
|
||||
private static final int FLUID_LEVELS = 16;
|
||||
@@ -131,7 +132,14 @@ final class HydrologyVoxels {
|
||||
}
|
||||
|
||||
static byte plannedSurface(WaterRole role, boolean solidObject, boolean seaLayers, boolean seaDecoration, byte fluid) {
|
||||
return solidObject || seaFloor(role) && (seaLayers || seaDecoration) ? SOLID : fluid;
|
||||
if (solidObject) {
|
||||
return SOLID;
|
||||
}
|
||||
return seaFloor(role) && (seaLayers || seaDecoration) ? seaCover(fluid) : fluid;
|
||||
}
|
||||
|
||||
static byte seaCover(byte fluid) {
|
||||
return (byte) (SEA_COVER | fluid);
|
||||
}
|
||||
|
||||
static boolean decoratedBy(IrisBiome biome, NativeBlockState state, IrisData data) {
|
||||
@@ -247,7 +255,13 @@ final class HydrologyVoxels {
|
||||
}
|
||||
|
||||
private static boolean holdsSurface(byte planned, byte voxel) {
|
||||
return planned == SOLID ? voxel == SOLID || fluid(voxel) : sameFluid(planned, voxel);
|
||||
if (planned == SOLID) {
|
||||
return voxel == SOLID || fluid(voxel);
|
||||
}
|
||||
if ((planned & SEA_COVER) != 0) {
|
||||
return voxel == SOLID || sameFluid((byte) (planned & ~SEA_COVER), voxel);
|
||||
}
|
||||
return sameFluid(planned, voxel);
|
||||
}
|
||||
|
||||
private boolean opensSideways(Volume volume, int x, int y, int z) {
|
||||
|
||||
Reference in new issue
Block a user