mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-01 17:00:26 +00:00
Integrate optional terrain transforms
- Add versioned terrain providers that run before content placement. - Resolve transformed terrain heights, occupancy, and cave metadata through bounded caches. - Initialize native structures after binding the modded generation runtime. - Cover transform behavior, provider resolution, and structure binding with regression tests.
This commit is contained in:
1 parent
74df63f717
commit
25c04c0157
35 files changed
+2160
-21
No files matched your search
+9
@@ -242,6 +242,7 @@ public final class IrisModdedChunkGenerator implements NativeGeneratorOwner, Nat
|
||||
this.announced.set(false);
|
||||
resetRuntimeCaches();
|
||||
this.engineBinding.complete(replacement);
|
||||
this.nativeGenerator.initializeStructureState(level);
|
||||
// Bind time: a feature-order cycle in the new pack is reported here, once, and degrades to features-off.
|
||||
// Never waits on a build owned by another thread: this method owns the generator monitor and the build
|
||||
// path can need it.
|
||||
@@ -442,12 +443,14 @@ public final class IrisModdedChunkGenerator implements NativeGeneratorOwner, Nat
|
||||
}
|
||||
Engine current = engineIfBound();
|
||||
if (NativeDimensionRuntime.sameWorld(boundLevel, level) && current != null && current.getComplex() != null) {
|
||||
nativeGenerator.initializeStructureState(level);
|
||||
return;
|
||||
}
|
||||
requireCompletedShutdown(engine);
|
||||
unloading = false;
|
||||
Engine bound = bindEngine(level);
|
||||
nativeGenerator.installVolumeIndex(level, bound);
|
||||
nativeGenerator.initializeStructureState(level);
|
||||
// Bind time: a feature-order cycle is reported here, once, and degrades to features-off. Non-waiting for
|
||||
// the same reason as repointAndBind: this method owns the generator monitor.
|
||||
importedFeatures.prepareWithoutWaiting(bound);
|
||||
@@ -1097,6 +1100,12 @@ public final class IrisModdedChunkGenerator implements NativeGeneratorOwner, Nat
|
||||
return current.getDimensionStackContext() != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean terrainTransformed() {
|
||||
Engine current = engine;
|
||||
return current != null && current.getComplex().getTerrainTransform() != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int runtimeId(Engine current) {
|
||||
return current.getCacheID();
|
||||
|
||||
Reference in new issue
Block a user