Connect configuration with the mantle for fluid bodies

This commit is contained in:
cyberpwn
2021-09-04 14:05:16 -04:00
parent e2d07f7e78
commit a3aedd5fad
5 changed files with 31 additions and 13 deletions

View File

@@ -293,7 +293,7 @@ public class IrisEngineMantle implements EngineMantle {
x = Math.max(z, x);
int u = x;
int v = computeFeatureRange();
int c = computeCarvingRange();
int c = Math.max(computeCarvingRange(), computeBodyRange());
x = Math.max(jig, x);
x = Math.max(x, v);
x = Math.max(x, c);
@@ -308,6 +308,22 @@ public class IrisEngineMantle implements EngineMantle {
return x;
}
private int computeBodyRange() {
int m = 0;
m = Math.max(m, getDimension().getFluidBodies().getMaxRange(getData()));
for (IrisRegion i : getDimension().getAllRegions(getEngine())) {
m = Math.max(m, i.getFluidBodies().getMaxRange(getData()));
}
for (IrisBiome i : getDimension().getAllBiomes(getEngine())) {
m = Math.max(m, i.getFluidBodies().getMaxRange(getData()));
}
return m;
}
private int computeCarvingRange() {
int m = 0;