mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-26 14:00:26 +00:00
Restore semantic cave sampling
- Semantic capture samples subterrain cave biomes per voxel as before
This commit is contained in:
1 parent
04f2798c06
commit
9d9acc7a3a
1 file changed
+3
-5
@@ -155,7 +155,7 @@ public final class GenerationSemanticCapture {
|
||||
int minimumX = Math.multiplyExact(chunkX, CHUNK_SIZE);
|
||||
int minimumZ = Math.multiplyExact(chunkZ, CHUNK_SIZE);
|
||||
BitSet resolvedCaves = new BitSet();
|
||||
CaveBiomes caveBiomes = new CaveBiomes(engine, scoped, chunkX, chunkZ);
|
||||
CaveBiomes caveBiomes = new CaveBiomes(engine, scoped);
|
||||
mantle.iterateChunk(chunkX, chunkZ, MatterCavern.class, (localX, y, localZ, cavern) -> {
|
||||
if (!caveSpace.test(localX, y, localZ)) {
|
||||
return;
|
||||
@@ -276,17 +276,15 @@ public final class GenerationSemanticCapture {
|
||||
private static final class CaveBiomes {
|
||||
private final Engine engine;
|
||||
private final boolean scoped;
|
||||
private final boolean subterrain;
|
||||
private final CaveFallback fallback;
|
||||
private final IrisDimensionCarvingResolver.State fallbackState = new IrisDimensionCarvingResolver.State();
|
||||
private IrisDimensionCarvingResolver.Snapshot snapshot;
|
||||
private int minimumY;
|
||||
private String lastKey;
|
||||
|
||||
private CaveBiomes(Engine engine, boolean scoped, int chunkX, int chunkZ) {
|
||||
private CaveBiomes(Engine engine, boolean scoped) {
|
||||
this.engine = engine;
|
||||
this.scoped = scoped;
|
||||
this.subterrain = scoped && !engine.subterrainAbsentInChunk(chunkX, chunkZ);
|
||||
this.fallback = scoped && engine instanceof IrisEngine irisEngine
|
||||
&& irisEngine.hasGenerationRuntimeScope() && !engine.getPlatformHooks().isMainThread()
|
||||
? new CaveFallback(engine.getComplex(), engine.getDimensionStackContext())
|
||||
@@ -308,7 +306,7 @@ public final class GenerationSemanticCapture {
|
||||
snapshot = IrisDimensionCarvingResolver.snapshot(engine);
|
||||
minimumY = engine.getWorld().minHeight();
|
||||
}
|
||||
IrisBiome featureBiome = subterrain ? engine.getSubterrainBiome(x, y, z) : null;
|
||||
IrisBiome featureBiome = engine.getSubterrainBiome(x, y, z);
|
||||
if (featureBiome != null) {
|
||||
return featureBiome;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user