Built-in settings declare their JSON keys: deposits, decorators, importedStructures

DepositSettings and DecorantSettings hold their one option's list as the value of
the key (root), StructureSettings is the object under importedStructures. The
feature ids stay the modules' identity. README names the keys.
This commit is contained in:
piexel committed 2026-10-09 23:27:19 +02:00
1 parent 4203c07c29
commit 13aa3ccc68
8 files changed
+18 -13

No files matched your search

@@ -28,11 +28,11 @@ import java.util.Collections;
import java.util.List;
/**
* The decorators one biome declares, written as {@code "iris:decorant": {"decorators": [...]}}. IrisApi types only, like
* The decorators one biome declares, written as {@code "decorators": [...]}, the list of decorators. IrisApi types only, like
* {@link Decorator}.
*/
@Desc("Decorators are used for things like tall grass, bisected flowers, and even kelp or cactus (random heights)")
@Feature(id = "iris:decorant", name = "Decorators", targets = Target.BIOME)
@Feature(id = "iris:decorant", name = "Decorators", key = "decorators", root = "decorators", targets = Target.BIOME)
public final class DecorantSettings implements IrisFeature {
@MinItems(1)
@Desc("Decorators are used for things like tall grass, bisected flowers, and even kelp or cactus (random heights)")
@@ -32,7 +32,7 @@ import java.util.List;
import java.util.Optional;
/**
* One decorator of a biome, as packs write it in the {@code decorators} of {@code "iris:decorant"} or under
* One decorator of a biome, as packs write it in the {@code "decorators"} list or under
* {@code snippet/decorator/}: which blocks it places, where, how often and how tall. A value of IrisApi types only; the
* decorant module resolves the blocks and builds the noise.
*/
@@ -30,7 +30,7 @@ import java.util.Collections;
import java.util.List;
/**
* One kind of deposit a dimension, region or biome generates, as packs write it in the {@code generators} of {@code "iris:deposit"} or under
* One kind of deposit a dimension, region or biome generates, as packs write it in the {@code "deposits"} list or under
* {@code snippet/deposit/}: how many clumps of which blocks, how large, at which heights and in which biomes. A value
* of IrisApi types only; the deposit module builds the clumps and resolves the blocks.
*/
@@ -26,12 +26,12 @@ import com.volmit.config.Feature;
import java.util.List;
/**
* The deposits one dimension, region or biome declares, written as {@code "iris:deposit": {"generators": [...]}}. Levels stack:
* The deposits one dimension, region or biome declares, written as {@code "deposits": [...]}, the list of generators. Levels stack:
* a chunk gets the deposits of its dimension, its centre column's region and that column's biome. IrisApi types only,
* like {@link DepositGenerator}.
*/
@Desc("Ores and other deposits generated in every chunk where this applies")
@Feature(id = "iris:deposit", name = "Deposits", targets = {Target.DIMENSION, Target.REGION, Target.BIOME})
@Feature(id = "iris:deposit", name = "Deposits", key = "deposits", root = "generators", targets = {Target.DIMENSION, Target.REGION, Target.BIOME})
public final class DepositSettings implements IrisFeature {
@Desc("Define deposit generators that this applies to chunks")
private List<DepositGenerator> generators = List.of();
@@ -33,12 +33,12 @@ import java.util.List;
/**
* How a dimension treats the platform's own structures (vanilla, data pack and mod structures), written as
* {@code "iris:structure": {"disabled": [...], "adjustments": [...]}}: which ones it disables, how the ones that still
* {@code "importedStructures": {"disabled": [...], "adjustments": [...]}}: which ones it disables, how the ones that still
* generate are moved and fitted, how often structure sets start, and whether installed data packs may replace the
* platform's own definitions. The JSON packs wrote as {@code importedStructures}. IrisApi types only.
* platform's own definitions. IrisApi types only.
*/
@Desc("Controls native vanilla, mod, and ingested datapack structure generation for this dimension. Every registered structure generates through its native placement unless its key matches 'disabled', equals a key in 'disabledExact', or a viable dimension-level Iris placement explicitly replaces its source. Family matching uses namespace, slash, or underscore boundaries, while exact matching compares normalized complete keys only. Run '/iris structure list <dimension>' to dump every valid key. Only affects newly generated chunks and is separate from Iris structure placements.")
@Feature(id = "iris:structure", name = "Structures", targets = Target.DIMENSION)
@Feature(id = "iris:structure", name = "Structures", key = "importedStructures", targets = Target.DIMENSION)
public final class StructureSettings implements IrisFeature {
@MinItems(1)
@Ref(Reference.STRUCTURE_PREFIX)
@@ -42,7 +42,7 @@ import com.volmit.vanilla.VanillaStructureStartContext;
import java.util.List;
/**
* What {@code iris:structure} says about the platform's own structures. The dimension's {@code iris:structure}
* What {@code iris:structure} says about the platform's own structures. The dimension's {@code importedStructures}
* settings ({@link ImportedStructures}) disable, adjust and set them up; the pack's structure placements replace
* them ({@code vanillaSource} with native suppression), place them alongside ({@link IrisStructureLocator#isPlaced})
* and start them where their {@code nativeStructures} grids say ({@link NativeStartPlanner}).
@@ -51,7 +51,7 @@ import com.volmit.world.PackWorld;
* the pack's structure files.
* <p>
* It decides over the platform's own structures through its vanilla structure hook ({@link StructureVanillaHook}): the
* dimension's {@code iris:structure} settings disable, adjust and set them up, and the pack's structure placements
* dimension's {@code importedStructures} settings disable, adjust and set them up, and the pack's structure placements
* replace them, place them alongside, and start them where their {@code nativeStructures} grids say.
*/
public final class StructureModule implements IrisModule, ModuleLifecycle {