Contain failed placements and let engine failures end the chunk

Placement code caught Throwable and logged it, so a closed session, a stopping executor or an OOM inside a placement left a half-built chunk that was then persisted. A classifier in the api separates those failures from content failures: the first are rethrown, the second are skipped with one rate-limited warning per kind, subject and failure type.

Upstream: 54f3595ba ebe4aa1e4 7b38f7584 f4f7e92a4 8cf9e01d9
This commit is contained in:
piexel committed 2026-11-10 01:04:37 +01:00
1 parent fc5c6ce0ab
commit de1c6e887f
13 files changed
+318 -22

No files matched your search

@@ -26,6 +26,7 @@ import art.arcane.volmlib.util.math.RNG;
import com.volmit.ModuleLog;
import com.volmit.block.BlockState;
import com.volmit.config.FeatureSettings;
import com.volmit.generation.GenerationFailures;
import com.volmit.noise.NoiseFactory;
import com.volmit.resource.ResourceId;
import com.volmit.world.PackWorld;
@@ -301,7 +302,7 @@ public final class BiomeLayers {
try {
blocks.add(layer.get(random, index + j, (wx + j) / blocksPerSample, j, (wz - j) / blocksPerSample));
} catch (Throwable e) {
log.error("A biome layer failed to pick a block", e);
GenerationFailures.skipPlacement(log, e, "layer block", "biome layer " + index, "at " + (long) wx + "," + (long) wz + " depth " + j);
}
}