mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-22 08:07:42 +00:00
Reworked terrain transitions
- New terrain heights meet saved boundaries while retaining local relief - Surface water levels approach saved fluid heights across the band - Cave and physical biome matching use a four-block seam patch - Terrain generates once without speculative neighbor containment - Bounded caches serve transition membership and boundary lookups - Saved biome writes honor the selected durability policy - Release labels and presentation code leave generation identity unchanged - Unfinished objects retain blocks and metadata across pack changes - Whole structure assemblies preserve pending excavation and foundations - New placements keep pending historical pieces clear - Transition probes cover cutovers and retained object fragments
This commit is contained in:
1 parent
9eb05fd987
commit
8c3e5d547b
159 files changed
+6092
-1905
No files matched your search
+1
-2
@@ -66,7 +66,6 @@ import art.arcane.iris.world.history.TerrainNativeBlockKeys;
|
||||
|
||||
import art.arcane.volmlib.nativelib.terrain.NativeChunkWritePolicy;
|
||||
|
||||
import art.arcane.iris.world.history.TerrainBoundarySignature;
|
||||
import art.arcane.iris.world.history.NativeBiomeSpawnSelection;
|
||||
import art.arcane.iris.pack.loading.IrisData;
|
||||
import art.arcane.iris.pack.PackValidationRegistry;
|
||||
@@ -1086,7 +1085,7 @@ public final class IrisModdedChunkGenerator implements NativeGeneratorOwner, Nat
|
||||
|
||||
@Override
|
||||
public NativeBlockColumn resolvedColumn(Engine current, int x, int z) {
|
||||
return current.getComplex().resolvedTerrainColumn(x, z).map(TerrainBoundarySignature::geometry).orElse(null);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-1
@@ -102,7 +102,8 @@ final class ModdedNativeStructurePolicy implements NativeModdedStructureStage.Po
|
||||
|
||||
@Override
|
||||
public NativeBlockPositionPredicate protectedPositions(Engine context) {
|
||||
return GenerationWritePolicy.protectedPositions(context.getDimension().getStaticObjectLayer(context.getData()),
|
||||
return GenerationWritePolicy.protectedPositions(context.getDimension().getStaticObjectLayer(context.getData())
|
||||
.forTransition(context),
|
||||
context.getDimensionStackContext(), context.getMinHeight());
|
||||
}
|
||||
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package art.arcane.iris.modded;
|
||||
|
||||
import art.arcane.iris.generation.runtime.Engine;
|
||||
import net.minecraft.SharedConstants;
|
||||
import net.minecraft.server.Bootstrap;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.mockito.Mockito.CALLS_REAL_METHODS;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.never;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.verifyNoInteractions;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
public final class ModdedTerrainHeightQueryTest {
|
||||
@BeforeClass
|
||||
public static void bootstrap() {
|
||||
SharedConstants.tryDetectVersion();
|
||||
Bootstrap.bootStrap();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void nativeQueriesUseLiveHeightsWithoutGeneratingTerrain() {
|
||||
IrisModdedChunkGenerator generator = mock(IrisModdedChunkGenerator.class, CALLS_REAL_METHODS);
|
||||
Engine engine = mock(Engine.class);
|
||||
assertNull(generator.resolvedColumn(engine, -1, -33));
|
||||
verifyNoInteractions(engine);
|
||||
|
||||
when(engine.getHeight(-1, -33, true)).thenReturn(12, 18);
|
||||
when(engine.getHeight(-1, -33, false)).thenReturn(24);
|
||||
assertEquals(12, generator.terrainHeight(engine, -1, -33, true, true));
|
||||
assertEquals(18, generator.terrainHeight(engine, -1, -33, true, true));
|
||||
assertEquals(24, generator.terrainHeight(engine, -1, -33, false, true));
|
||||
verify(engine, never()).getComplex();
|
||||
verify(engine, never()).getMode();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user