mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-27 00:04:42 +00:00
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:
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);
|
||||
|
||||
Reference in new issue
Block a user