fix caves being non-deterministic

This commit is contained in:
Julian Krings 2025-06-21 12:04:07 +02:00
parent 7f6d65a13e
commit 9d44ac0b47
No known key found for this signature in database
GPG Key ID: 208C6E08C3B718D2

View File

@ -86,13 +86,9 @@ public class IrisCavePlacer implements IRare {
}
if (y == -1) {
if(!breakSurface) {
int eH = engine.getHeight(x, z);
if (caveStartHeight.getMax() > eH) {
caveStartHeight.setMax(eH);
}
}
y = (int) caveStartHeight.get(rng, x, z, data);
int h = (int) caveStartHeight.get(rng, x, z, data);
int ma = breakSurface ? h : (int) (engine.getComplex().getHeightStream().get(x, z) - 9);
y = Math.min(h, ma);
}
try {