Caves in the mantle

This commit is contained in:
cyberpwn
2021-08-27 05:32:40 -04:00
parent 0a930db7d6
commit 524b63e88c
5 changed files with 95 additions and 24 deletions

View File

@@ -27,6 +27,7 @@ import com.volmit.iris.engine.mantle.components.MantleFeatureComponent;
import com.volmit.iris.engine.mantle.components.MantleJigsawComponent;
import com.volmit.iris.engine.mantle.components.MantleObjectComponent;
import com.volmit.iris.engine.object.biome.IrisBiome;
import com.volmit.iris.engine.object.carving.IrisCarving;
import com.volmit.iris.engine.object.deposits.IrisDepositGenerator;
import com.volmit.iris.engine.object.feature.IrisFeaturePotential;
import com.volmit.iris.engine.object.jigsaw.IrisJigsawStructurePlacement;
@@ -294,15 +295,36 @@ public class IrisEngineMantle implements EngineMantle {
x = Math.max(z, x);
int u = x;
int v = computeFeatureRange();
int c = computeCarvingRange();
x = Math.max(jig, x);
x = Math.max(x, v);
x = Math.max(x, c);
x = (Math.max(x, 16) + 16) >> 4;
x = x % 2 == 0 ? x + 1 : x;
Iris.info("Parallax Size: " + x + " Chunks");
Iris.info(" Object Parallax Size: " + u + " (" + ((Math.max(u, 16) + 16) >> 4) + ")");
Iris.info(" Jigsaw Parallax Size: " + jig + " (" + ((Math.max(jig, 16) + 16) >> 4) + ")");
Iris.info(" Feature Parallax Size: " + v + " (" + ((Math.max(v, 16) + 16) >> 4) + ")");
Iris.info(" Object Mantle Size: " + u + " (" + ((Math.max(u, 16) + 16) >> 4) + ")");
Iris.info(" Jigsaw Mantle Size: " + jig + " (" + ((Math.max(jig, 16) + 16) >> 4) + ")");
Iris.info(" Feature Mantle Size: " + v + " (" + ((Math.max(v, 16) + 16) >> 4) + ")");
Iris.info(" Carving Mantle Size: " + c + " (" + ((Math.max(c, 16) + 16) >> 4) + ")");
return x;
}
private int computeCarvingRange() {
int m = 0;
m = Math.max(m, getDimension().getCarving().getMaxRange(getData()));
for(IrisRegion i : getDimension().getAllRegions(getEngine()))
{
m = Math.max(m, i.getCarving().getMaxRange(getData()));
}
for(IrisBiome i : getDimension().getAllBiomes(getEngine()))
{
m = Math.max(m, i.getCarving().getMaxRange(getData()));
}
return m;
}
}