From cf8b2bb0f61d0d40fbf3fd4cf556023ce8fdecb3 Mon Sep 17 00:00:00 2001 From: piexel Date: Sat, 10 Oct 2026 18:04:40 +0200 Subject: [PATCH] StructureStep becomes DecorationStep: the platform's decoration steps also order its placed features, which the next service names Pure rename (and its javadoc); every use in StructureFit, the test and CONTRACTS follows. --- CONTRACTS.md | 2 +- .../vanilla/{StructureStep.java => DecorationStep.java} | 6 ++++-- src/main/java/com/volmit/vanilla/StructureFit.java | 2 +- src/test/java/com/volmit/VanillaStructureValuesTest.java | 6 +++--- 4 files changed, 9 insertions(+), 7 deletions(-) rename src/main/java/com/volmit/vanilla/{StructureStep.java => DecorationStep.java} (70%) diff --git a/CONTRACTS.md b/CONTRACTS.md index d86722509..f7ff7edaf 100644 --- a/CONTRACTS.md +++ b/CONTRACTS.md @@ -28,7 +28,7 @@ types that carry them and lists what the Iris adapter still owes. | Block states and palettes | `BlockState`, `BlockRegistry`, `BlockPalette`, `BlockSpec` (`BlockRegistry.resolve(BlockSpec)`, `blockEntity`), `PaletteSpec` and `PaletteSampler` (`BlockRegistry.palette`) | | Noise from pack-described styles | `NoiseStyle`, `StyledRange`, `PackResources.noise()`, `NoiseFactory`, `NoiseSampler` | | Values in settings | `BlockSpec`, `PaletteSpec`, `NoiseStyle`, `StyledRange`, `Range`, `BlockPosition`, `JigsawOverrides`, `Object` as `ValueKind.AnyKind` | -| Decisions over and fit of the platform's own structures | service `VanillaStructures` (`rule`, `starts`, `shift`, `reach`, `beforePieces`, `afterPieces`, `setup`), `VanillaStructureRule`, `VanillaStructureContext`, `VanillaStructureStart`, `VanillaStructureStartContext`, `VanillaStructureSetup`, `PlatformStart`, `StartMemo`, `StartReach`, `StructureFit` (`Start`, `Piece`, `ColumnVisitor`), `StructureStep`, `TerrainAdaptation`, `PieceKind`, `TemplateCells`, `world.BlockAccess`, host `FeatureCatalog.registrations(service)` | +| Decisions over and fit of the platform's own structures | service `VanillaStructures` (`rule`, `starts`, `shift`, `reach`, `beforePieces`, `afterPieces`, `setup`), `VanillaStructureRule`, `VanillaStructureContext`, `VanillaStructureStart`, `VanillaStructureStartContext`, `VanillaStructureSetup`, `PlatformStart`, `StartMemo`, `StartReach`, `StructureFit` (`Start`, `Piece`, `ColumnVisitor`), `DecorationStep`, `TerrainAdaptation`, `PieceKind`, `TemplateCells`, `world.BlockAccess`, host `FeatureCatalog.registrations(service)` | | Pack-scoped resolution | `ResourceId`, `ResourceKey`, `PackResources` (`find`, `ids`), `PackBiome`, `PackRegion` | | Module-owned pack resources | `ResourceKind`, `FeatureRegistry.registerResourceKind`, `@ResourceRef`, host `ModuleHost.reservingFolders`, `FeatureCatalog.resourceKinds()`, `ResourceKindSchema`, `ValueKind.ResourceReferenceKind` | | Module-owned pack checks | `Validator`, `ValidationContext`, `Problem`, `Severity`, `Subject`, `FeatureRegistry.registerValidator`, host `FeatureCatalog.validators()` | diff --git a/src/main/java/com/volmit/vanilla/StructureStep.java b/src/main/java/com/volmit/vanilla/DecorationStep.java similarity index 70% rename from src/main/java/com/volmit/vanilla/StructureStep.java rename to src/main/java/com/volmit/vanilla/DecorationStep.java index ce10204af..b9823bb7e 100644 --- a/src/main/java/com/volmit/vanilla/StructureStep.java +++ b/src/main/java/com/volmit/vanilla/DecorationStep.java @@ -1,7 +1,9 @@ package com.volmit.vanilla; -/** The decoration step in which the platform places a structure's pieces, in the platform's order. */ -public enum StructureStep { +/** A decoration step of the platform's chunk generation, in the platform's order: the step in which it places a structure's + * pieces, or a placed feature such as an ore or a tree. + */ +public enum DecorationStep { RAW_GENERATION, LAKES, LOCAL_MODIFICATIONS, diff --git a/src/main/java/com/volmit/vanilla/StructureFit.java b/src/main/java/com/volmit/vanilla/StructureFit.java index fa58bfa21..bae1f942c 100644 --- a/src/main/java/com/volmit/vanilla/StructureFit.java +++ b/src/main/java/com/volmit/vanilla/StructureFit.java @@ -67,7 +67,7 @@ public interface StructureFit { int chunkZ(); - StructureStep step(); + DecorationStep step(); /** The terrain adaptation the platform's definition of the structure asks for. */ TerrainAdaptation adaptation(); diff --git a/src/test/java/com/volmit/VanillaStructureValuesTest.java b/src/test/java/com/volmit/VanillaStructureValuesTest.java index e5b78a2a1..c682ffab3 100644 --- a/src/test/java/com/volmit/VanillaStructureValuesTest.java +++ b/src/test/java/com/volmit/VanillaStructureValuesTest.java @@ -4,10 +4,10 @@ import com.volmit.block.BlockState; import com.volmit.config.OptionsMetadata; import com.volmit.resource.ResourceId; import com.volmit.service.VanillaStructures; +import com.volmit.vanilla.DecorationStep; import com.volmit.vanilla.JigsawOverrides; import com.volmit.vanilla.StartMemo; import com.volmit.vanilla.StartReach; -import com.volmit.vanilla.StructureStep; import com.volmit.vanilla.TemplateCells; import com.volmit.vanilla.VanillaStructureContext; import com.volmit.vanilla.VanillaStructureRule; @@ -69,8 +69,8 @@ class VanillaStructureValuesTest { @Test void onlyTheUndergroundStepsAreUnderground() { - assertEquals(List.of(StructureStep.UNDERGROUND_STRUCTURES, StructureStep.STRONGHOLDS, StructureStep.UNDERGROUND_DECORATION), - java.util.Arrays.stream(StructureStep.values()).filter(StructureStep::isUnderground).toList()); + assertEquals(List.of(DecorationStep.UNDERGROUND_STRUCTURES, DecorationStep.STRONGHOLDS, DecorationStep.UNDERGROUND_DECORATION), + java.util.Arrays.stream(DecorationStep.values()).filter(DecorationStep::isUnderground).toList()); } @Test