Give the surface biome where a region lists no cave biomes

The cave biome stream answers such a region with a placeholder biome that has no pack key. It reached the cave depth lookup and the terrain sampler, which both key by the pack name, and every chunk failed with a NullPointerException.
This commit is contained in:
piexel committed 2026-11-10 16:03:55 +01:00
1 parent cb9103c4d9
commit aaa5e05cf0
1 file changed
+6 -1
@@ -275,7 +275,7 @@ public interface Engine extends DataProvider, Fallible, BlockUpdater, Renderer,
}
IrisBiome caveBiome = getCaveBiome(x, z);
if (caveBiome == null) {
if (caveBiome == null || isCaveBiomePlaceholder(caveBiome)) {
return surfaceBiome;
}
@@ -293,6 +293,11 @@ public interface Engine extends DataProvider, Fallible, BlockUpdater, Renderer,
return caveBiome;
}
/** The cave biome stream answers with a biome no pack file defines where the region lists no cave biomes. */
private static boolean isCaveBiomePlaceholder(IrisBiome caveBiome) {
return caveBiome.getLoadKey() == null;
}
@BlockCoordinates
default IrisBiome getSurfaceBiome(int x, int z) {
return getComplex().getTrueBiomeStream().get(x, z);