diff --git a/README.md b/README.md
index 1cf202039..2727a6778 100644
--- a/README.md
+++ b/README.md
@@ -49,8 +49,8 @@ only: `DepositSettings` holds `DepositGenerator`s (blocks as `BlockSpec`, its en
`art.arcane.iris.builtin.deposit`), and packs write `"deposits": [...]`, as they always have (`@Feature(key = "deposits", root = "generators")`: the key holds the one option's list). What needs Iris (resolving the
palette, ore checks, clump shapes per world seed) lives in the module's own code, `ResolvedDeposit`.
-Settings that live inside a class of Iris's own, such as an object placement's clamp, stilt, vacuum and edit settings, its slope condition,
-a cave profile, a floating child biome or a procedural coral, are module-owned classes too (`art.arcane.iris.builtin.validate`,
+Settings that live inside a class of Iris's own, such as an object placement's clamp, stilt, vacuum and edit settings, its slope condition
+or a procedural coral, are module-owned classes too (`art.arcane.iris.builtin.validate`,
`.stilt`, `.vacuum`, `.blocks`, `.prepare`, `.carve`, `.floating`, `.objects.*`). The module registers each with
`registry.registerHeldType(...)` so studio describes it from the module's own annotations; packs write the same JSON as before. Behaviour
that needs Iris (noise built from the styles, blocks resolved through the pack, baked object variants) lives in `Resolved*` classes beside the
@@ -73,6 +73,18 @@ for a pack, `BiomeLayers`, the world's state, keeps them and stacks a biome's la
rock and fluid as a block for every column; the terrain, cave, floating and post stages ask them. The slope limit of a layer, a decorator and an
object placement is the one `SlopeClip`.
+Caves, floating islands and ores are settings of their modules too, written under the keys they always had. `iris:carve` owns
+`caveProfile` (dimension, region, biome; an object, or a `snippet/cave-profile/...` reference), `carving` (dimension; a list of bands) and
+`carvingEnabled` (dimension; a boolean), `carvingBiome` (biome; a biome key) and `caveMinDepthBelowSurface` (biome; a number). `iris:floating`
+owns `floatingChildBiomes` (biome; a list) and `mergeFloatingChildBiomes` (biome; a boolean). `iris:terrain` owns `ores` (dimension, region,
+biome; a list of generators) and `hideOresForHiddenOre` (dimension; a boolean); `iris:deposit` owns `depositVariants` (dimension, region, biome; a list)
+and `oreDepositFrequencyMultiplier` and `oreDepositSizeMultiplier` (biome; numbers). Behaviour that needs Iris lives in the `Resolved*` classes beside the
+workers: `ResolvedOre`/`ResolvedOres` (blocks and chance noise per world, `TerrainOres` the world's state), `ResolvedDepositVariant`,
+`ResolvedCarvingEntry`/`CarvingBands`/`CarvingResolver` (the band for a position) and `ResolvedFloatingChild`. The settings that name biomes
+(`carvingBiome`, a band's biome, a floating child's target and carving) implement `LinkedBiomes`, which is how Iris's biome tree and the biomes a
+dimension reaches learn of them without reading the settings classes; and `iris:carve` provides the `CaveBiomes` service
+(`CaveBiomeBands`), which Iris asks for the dimension's carving band at a position and for a biome's minimum cave depth.
+
Packs write each settings feature under the short key it declares: `deposits` (dimension, region, biome; a list), `decorators`
(biome; a list) and `importedStructures` (dimension; an object of `disabled`, `adjustments` and the rest). The feature ids
(`iris:deposit`, `iris:decorant`, `iris:structure`) stay the modules' identity in the stage graph and logs. A key is unique
diff --git a/src/main/java/art/arcane/iris/builtin/carve/CarvingBiomeSettings.java b/src/main/java/art/arcane/iris/builtin/carve/CarvingBiomeSettings.java
new file mode 100644
index 000000000..e2942aecb
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/carve/CarvingBiomeSettings.java
@@ -0,0 +1,54 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.builtin.carve;
+
+import com.volmit.FeatureAttachment.Target;
+import com.volmit.IrisFeature;
+import com.volmit.config.Desc;
+import com.volmit.config.Feature;
+import com.volmit.config.LinkedBiomes;
+import com.volmit.config.Ref;
+import com.volmit.config.Reference;
+
+import java.util.Set;
+
+/** A biome's {@code carvingBiome}, written as the biome key: it registers that biome with the pack's layout and is not applied as a substitute under carvings. */
+@Desc("Registers the referenced biome with this pack's reachable biome set. It is NOT applied as a substitute under carvings; cave biomes come from the region's caveBiomes list.")
+@Feature(id = "iris:carve/biome", name = "Carving biome", key = "carvingBiome", root = "biome", targets = Target.BIOME)
+public final class CarvingBiomeSettings implements IrisFeature, LinkedBiomes {
+ @Ref(Reference.PACK_BIOME)
+ @Desc("Registers the referenced biome with this pack's reachable biome set. It is NOT applied as a substitute under carvings; cave biomes come from the region's caveBiomes list.")
+ private String biome = "";
+
+ public CarvingBiomeSettings() {
+ }
+
+ public CarvingBiomeSettings(String biome) {
+ this.biome = biome;
+ }
+
+ public String biome() {
+ return biome == null ? "" : biome;
+ }
+
+ @Override
+ public Set treeBiomes() {
+ return Set.of(biome());
+ }
+}
diff --git a/src/main/java/art/arcane/iris/builtin/carve/CarvingEnabledSettings.java b/src/main/java/art/arcane/iris/builtin/carve/CarvingEnabledSettings.java
new file mode 100644
index 000000000..d09f7e7ac
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/carve/CarvingEnabledSettings.java
@@ -0,0 +1,43 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.builtin.carve;
+
+import com.volmit.FeatureAttachment.Target;
+import com.volmit.IrisFeature;
+import com.volmit.config.Desc;
+import com.volmit.config.Feature;
+
+/** A dimension's {@code carvingEnabled}, written as the bare boolean. */
+@Desc("Enable or disable all carving for this dimension")
+@Feature(id = "iris:carve/enabled", name = "Carving enabled", key = "carvingEnabled", root = "enabled", targets = Target.DIMENSION)
+public final class CarvingEnabledSettings implements IrisFeature {
+ @Desc("Enable or disable all carving for this dimension")
+ private boolean enabled = true;
+
+ public CarvingEnabledSettings() {
+ }
+
+ public CarvingEnabledSettings(boolean enabled) {
+ this.enabled = enabled;
+ }
+
+ public boolean enabled() {
+ return enabled;
+ }
+}
diff --git a/src/main/java/art/arcane/iris/builtin/carve/CarvingEntry.java b/src/main/java/art/arcane/iris/builtin/carve/CarvingEntry.java
new file mode 100644
index 000000000..7508832a7
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/carve/CarvingEntry.java
@@ -0,0 +1,103 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.builtin.carve;
+
+import com.volmit.config.Desc;
+import com.volmit.config.Range;
+import com.volmit.config.Ref;
+import com.volmit.config.Reference;
+import com.volmit.config.Snippet;
+import com.volmit.noise.NoiseStyle;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * One dimension-level cave biome override, an entry of {@code carving}: a pack biome that replaces the cave biome within a band
+ * of world Y, optionally split into child entries by a noise pattern. IrisApi types only; {@code CarvingResolver} picks
+ * the entry for a position.
+ */
+@Snippet("dimension-carving-entry")
+@Desc("Dimension-level cave biome override with absolute world Y bounds.")
+public final class CarvingEntry {
+ private static final double DEFAULT_WORLD_Y_MIN = -64;
+ private static final double DEFAULT_WORLD_Y_MAX = 320;
+ private static final double DEFAULT_CHILD_SHRINK_FACTOR = 1.5;
+ private static final int DEFAULT_CHILD_RECURSION_DEPTH = 3;
+
+ @Desc("Stable id for this carving entry")
+ private String id = "";
+
+ @Desc("Enable or disable this carving entry")
+ private boolean enabled = true;
+
+ @Ref(Reference.PACK_BIOME)
+ @Desc("Cave biome to apply when world Y falls within worldYRange")
+ private String biome = "";
+
+ @Desc("Absolute world Y bounds where this carving entry applies")
+ private Range worldYRange = Range.of(DEFAULT_WORLD_Y_MIN, DEFAULT_WORLD_Y_MAX);
+
+ @Desc("If this carving entry has child carving entries, this controls how small those child carving patches are.")
+ private double childShrinkFactor = DEFAULT_CHILD_SHRINK_FACTOR;
+
+ @Desc("If this carving entry has child carving entries, this controls the shape pattern used to pick them.")
+ private NoiseStyle childStyle = NoiseStyle.of("CELLULAR_IRIS_DOUBLE");
+
+ @Desc("Child carving entry ids. Child ids can point back to parent ids to create cycles; recursion is bounded by childRecursionDepth.")
+ private List children = List.of();
+
+ @Desc("Maximum recursion depth when resolving child carving entries from this entry.")
+ private int childRecursionDepth = DEFAULT_CHILD_RECURSION_DEPTH;
+
+ public CarvingEntry() {
+ }
+
+ public String id() {
+ return id == null ? "" : id;
+ }
+
+ public boolean enabled() {
+ return enabled;
+ }
+
+ public String biome() {
+ return biome == null ? "" : biome;
+ }
+
+ public Range worldYRange() {
+ return worldYRange;
+ }
+
+ public double childShrinkFactor() {
+ return childShrinkFactor;
+ }
+
+ public NoiseStyle childStyle() {
+ return childStyle;
+ }
+
+ public List children() {
+ return children == null ? List.of() : Collections.unmodifiableList(children);
+ }
+
+ public int childRecursionDepth() {
+ return childRecursionDepth;
+ }
+}
diff --git a/src/main/java/art/arcane/iris/builtin/carve/CarvingSettings.java b/src/main/java/art/arcane/iris/builtin/carve/CarvingSettings.java
new file mode 100644
index 000000000..afd544963
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/carve/CarvingSettings.java
@@ -0,0 +1,80 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.builtin.carve;
+
+import com.volmit.FeatureAttachment.Target;
+import com.volmit.IrisFeature;
+import com.volmit.config.Desc;
+import com.volmit.config.Feature;
+import com.volmit.config.LinkedBiomes;
+import com.volmit.config.MinItems;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * The cave biome overrides a dimension declares, written as {@code "carving": [...]}, the list of {@link CarvingEntry}s.
+ * The biome of every enabled entry takes part in the pack's layout like any biome the dimension reaches.
+ */
+@Desc("Dimension-level cave biome carving overrides with absolute world Y ranges")
+@Feature(id = "iris:carve/bands", name = "Cave biome bands", key = "carving", root = "entries", targets = Target.DIMENSION)
+public final class CarvingSettings implements IrisFeature, LinkedBiomes {
+ @MinItems(1)
+ @Desc("Dimension-level cave biome carving overrides with absolute world Y ranges")
+ private List entries = List.of();
+
+ public CarvingSettings() {
+ }
+
+ public CarvingSettings(List entries) {
+ this.entries = List.copyOf(entries);
+ }
+
+ public List entries() {
+ return entries == null ? List.of() : Collections.unmodifiableList(entries);
+ }
+
+ /**
+ * The biome key {@code reference} stands for: the biome of the entry with that id, ignoring surrounding blanks, or
+ * {@code reference} itself when no entry has the id. When several entries share an id the last one counts.
+ */
+ public String biomeOf(String reference) {
+ CarvingEntry entry = null;
+ for (CarvingEntry candidate : entries()) {
+ if (candidate != null && !candidate.id().isBlank() && candidate.id().trim().equals(reference)) {
+ entry = candidate;
+ }
+ }
+ return entry == null ? reference : entry.biome();
+ }
+
+ @Override
+ public Set usedBiomes(Collection dimension) {
+ Set biomes = new LinkedHashSet<>();
+ for (CarvingEntry entry : entries()) {
+ if (entry != null && entry.enabled()) {
+ biomes.add(entry.biome());
+ }
+ }
+ return biomes;
+ }
+}
diff --git a/src/main/java/art/arcane/iris/builtin/carve/CaveDepthSettings.java b/src/main/java/art/arcane/iris/builtin/carve/CaveDepthSettings.java
new file mode 100644
index 000000000..08f005403
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/carve/CaveDepthSettings.java
@@ -0,0 +1,47 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.builtin.carve;
+
+import com.volmit.FeatureAttachment.Target;
+import com.volmit.IrisFeature;
+import com.volmit.config.Desc;
+import com.volmit.config.Feature;
+import com.volmit.config.MaxNumber;
+import com.volmit.config.MinNumber;
+
+/** A biome's {@code caveMinDepthBelowSurface}, written as the bare number of blocks. */
+@Desc("Minimum depth below terrain surface required before this cave biome can be selected.")
+@Feature(id = "iris:carve/min-depth", name = "Cave minimum depth", key = "caveMinDepthBelowSurface", root = "depth", targets = Target.BIOME)
+public final class CaveDepthSettings implements IrisFeature {
+ @MinNumber(0)
+ @MaxNumber(256)
+ @Desc("Minimum depth below terrain surface required before this cave biome can be selected.")
+ private int depth = 0;
+
+ public CaveDepthSettings() {
+ }
+
+ public CaveDepthSettings(int depth) {
+ this.depth = depth;
+ }
+
+ public int depth() {
+ return depth;
+ }
+}
diff --git a/src/main/java/art/arcane/iris/builtin/carve/CaveProfile.java b/src/main/java/art/arcane/iris/builtin/carve/CaveProfile.java
index 0884897b3..a64df4d67 100644
--- a/src/main/java/art/arcane/iris/builtin/carve/CaveProfile.java
+++ b/src/main/java/art/arcane/iris/builtin/carve/CaveProfile.java
@@ -19,7 +19,10 @@
package art.arcane.iris.builtin.carve;
import art.arcane.iris.builtin.anchor.ObjectPlaceMode;
+import com.volmit.FeatureAttachment.Target;
+import com.volmit.IrisFeature;
import com.volmit.config.Desc;
+import com.volmit.config.Feature;
import com.volmit.config.MaxNumber;
import com.volmit.config.MinItems;
import com.volmit.config.MinNumber;
@@ -35,11 +38,13 @@ import java.util.Optional;
/**
* A 3D cave profile as packs write it for a dimension, region or biome ({@code caveProfile}) or under
* {@code snippet/cave-profile/}: the noise fields that decide where caves are, how they meet the surface, where
- * cave fluid may sit and how objects find anchors in them. IrisApi types only; the carving module builds the noise.
+ * cave fluid may sit and how objects find anchors in them. A level that writes none has no profile, which is the
+ * same as one that is not {@code enabled}. IrisApi types only; the carving module builds the noise.
*/
@Snippet("cave-profile")
@Desc("Represents a configurable 3D cave profile.")
-public final class CaveProfile {
+@Feature(id = "iris:carve/profile", name = "Cave profile", key = "caveProfile", targets = {Target.DIMENSION, Target.REGION, Target.BIOME})
+public final class CaveProfile implements IrisFeature {
@Desc("Enable profile-driven cave carving.")
private boolean enabled = false;
diff --git a/src/main/java/art/arcane/iris/builtin/deposit/DepositVariant.java b/src/main/java/art/arcane/iris/builtin/deposit/DepositVariant.java
new file mode 100644
index 000000000..582301354
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/deposit/DepositVariant.java
@@ -0,0 +1,67 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.builtin.deposit;
+
+import com.volmit.config.Desc;
+import com.volmit.config.MaxNumber;
+import com.volmit.config.MinNumber;
+import com.volmit.config.Required;
+import com.volmit.config.Snippet;
+
+import java.util.Collections;
+import java.util.Map;
+
+/**
+ * One deposit ore remap rule, an entry of {@code depositVariants}: within a vertical band, ore blocks are rewritten to
+ * alternate blocks. A value of IrisApi types only; {@code ResolvedDepositVariant} resolves the blocks.
+ */
+@Snippet("deposit-variant")
+@Desc("Remaps ore block ids to alternate block ids within a vertical band. Ores declared at dimension, region, and biome scope can be rewritten at placement time (for example, iron_ore -> deepslate_iron_ore inside a deep carving band, or yourmod:iron -> yourmod:moon_iron inside a lunar biome).")
+public final class DepositVariant {
+ @Required
+ @MinNumber(-2048)
+ @MaxNumber(8192)
+ @Desc("Inclusive minimum world Y this variant applies at.")
+ private int minHeight = 0;
+
+ @Required
+ @MinNumber(-2048)
+ @MaxNumber(8192)
+ @Desc("Inclusive maximum world Y this variant applies at.")
+ private int maxHeight = 0;
+
+ @Required
+ @Desc("Source block id (for example `minecraft:iron_ore`) -> replacement block id (for example `minecraft:deepslate_iron_ore`). Any block id the data loader resolves is accepted, including external/mod blocks. Source match is by material only, so block properties on the source key are ignored.")
+ private Map remap = Map.of();
+
+ public DepositVariant() {
+ }
+
+ public int minHeight() {
+ return minHeight;
+ }
+
+ public int maxHeight() {
+ return maxHeight;
+ }
+
+ public Map remap() {
+ return remap == null ? Map.of() : Collections.unmodifiableMap(remap);
+ }
+}
diff --git a/src/main/java/art/arcane/iris/builtin/deposit/DepositVariantSettings.java b/src/main/java/art/arcane/iris/builtin/deposit/DepositVariantSettings.java
new file mode 100644
index 000000000..e6a6d15ef
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/deposit/DepositVariantSettings.java
@@ -0,0 +1,52 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.builtin.deposit;
+
+import com.volmit.FeatureAttachment.Target;
+import com.volmit.IrisFeature;
+import com.volmit.config.Desc;
+import com.volmit.config.Feature;
+import com.volmit.config.MinItems;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * The deposit ore remap rules one dimension, region or biome declares, written as {@code "depositVariants": [...]}, the list
+ * of {@link DepositVariant}s. The biome's rules apply first, then the region's, then the dimension's; the first matching rule wins.
+ */
+@Desc("Deposit ore remap rules. Each entry declares a vertical band and a source->replacement block id map. Applied biome first, then region, then dimension; first matching rule wins.")
+@Feature(id = "iris:deposit/variants", name = "Deposit variants", key = "depositVariants", root = "variants",
+ targets = {Target.DIMENSION, Target.REGION, Target.BIOME})
+public final class DepositVariantSettings implements IrisFeature {
+ @MinItems(1)
+ @Desc("Deposit ore remap rules. Each entry declares a vertical band and a source->replacement block id map. Applied biome first, then region, then dimension; first matching rule wins.")
+ private List variants = List.of();
+
+ public DepositVariantSettings() {
+ }
+
+ public DepositVariantSettings(List variants) {
+ this.variants = List.copyOf(variants);
+ }
+
+ public List variants() {
+ return variants == null ? List.of() : Collections.unmodifiableList(variants);
+ }
+}
diff --git a/src/main/java/art/arcane/iris/builtin/deposit/OreFrequencySettings.java b/src/main/java/art/arcane/iris/builtin/deposit/OreFrequencySettings.java
new file mode 100644
index 000000000..e279b0df6
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/deposit/OreFrequencySettings.java
@@ -0,0 +1,49 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.builtin.deposit;
+
+import com.volmit.FeatureAttachment.Target;
+import com.volmit.IrisFeature;
+import com.volmit.config.Desc;
+import com.volmit.config.Feature;
+import com.volmit.config.MaxNumber;
+import com.volmit.config.MinNumber;
+
+/** A biome's {@code oreDepositFrequencyMultiplier}, written as the bare number. */
+@Desc("Multiplier applied to the frequency of every ore deposit whose center is inside this biome. A value of 0.4 keeps 40% of ore veins while leaving non-ore deposits unchanged.")
+@Feature(id = "iris:deposit/ore-frequency", name = "Ore deposit frequency", key = "oreDepositFrequencyMultiplier", root = "multiplier", targets = Target.BIOME)
+public final class OreFrequencySettings implements IrisFeature {
+ private static final double UNCHANGED = 1D;
+
+ @MinNumber(0)
+ @MaxNumber(1)
+ @Desc("Multiplier applied to the frequency of every ore deposit whose center is inside this biome. A value of 0.4 keeps 40% of ore veins while leaving non-ore deposits unchanged.")
+ private double multiplier = UNCHANGED;
+
+ public OreFrequencySettings() {
+ }
+
+ public OreFrequencySettings(double multiplier) {
+ this.multiplier = multiplier;
+ }
+
+ public double multiplier() {
+ return multiplier;
+ }
+}
diff --git a/src/main/java/art/arcane/iris/builtin/deposit/OreSizeSettings.java b/src/main/java/art/arcane/iris/builtin/deposit/OreSizeSettings.java
new file mode 100644
index 000000000..80e1d5892
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/deposit/OreSizeSettings.java
@@ -0,0 +1,49 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.builtin.deposit;
+
+import com.volmit.FeatureAttachment.Target;
+import com.volmit.IrisFeature;
+import com.volmit.config.Desc;
+import com.volmit.config.Feature;
+import com.volmit.config.MaxNumber;
+import com.volmit.config.MinNumber;
+
+/** A biome's {@code oreDepositSizeMultiplier}, written as the bare number. */
+@Desc("Multiplier applied to the block count of every ore deposit whose center is inside this biome. Non-ore deposits are unchanged.")
+@Feature(id = "iris:deposit/ore-size", name = "Ore deposit size", key = "oreDepositSizeMultiplier", root = "multiplier", targets = Target.BIOME)
+public final class OreSizeSettings implements IrisFeature {
+ private static final double UNCHANGED = 1D;
+
+ @MinNumber(0.01)
+ @MaxNumber(16)
+ @Desc("Multiplier applied to the block count of every ore deposit whose center is inside this biome. Non-ore deposits are unchanged.")
+ private double multiplier = UNCHANGED;
+
+ public OreSizeSettings() {
+ }
+
+ public OreSizeSettings(double multiplier) {
+ this.multiplier = multiplier;
+ }
+
+ public double multiplier() {
+ return multiplier;
+ }
+}
diff --git a/src/main/java/art/arcane/iris/builtin/floating/FloatingChildSettings.java b/src/main/java/art/arcane/iris/builtin/floating/FloatingChildSettings.java
new file mode 100644
index 000000000..796b062f8
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/floating/FloatingChildSettings.java
@@ -0,0 +1,70 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.builtin.floating;
+
+import art.arcane.iris.builtin.carve.CarvingSettings;
+import com.volmit.FeatureAttachment.Target;
+import com.volmit.IrisFeature;
+import com.volmit.config.Desc;
+import com.volmit.config.Feature;
+import com.volmit.config.LinkedBiomes;
+import com.volmit.config.MinItems;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * The floating child biomes one biome declares, written as {@code "floatingChildBiomes": [...]}, the list of
+ * {@link FloatingChildBiome}s. The target biome of every child, and the biome its {@code carving} names, take part in the
+ * pack's layout like any biome a dimension reaches.
+ */
+@Desc("Floating child biomes that procedurally generate above this biome's terrain. Each entry references a target biome whose layers, decorators, and objects drive the floating island's visual design, while the config here drives size, shape, altitude, rarity, and water level. Multiple entries are supported and selected by rarity per column unless mergeFloatingChildBiomes is enabled.")
+@Feature(id = "iris:floating/children", name = "Floating child biomes", key = "floatingChildBiomes", root = "children", targets = Target.BIOME)
+public final class FloatingChildSettings implements IrisFeature, LinkedBiomes {
+ @MinItems(1)
+ @Desc("Floating child biomes that procedurally generate above this biome's terrain. Each entry references a target biome whose layers, decorators, and objects drive the floating island's visual design, while the config here drives size, shape, altitude, rarity, and water level. Multiple entries are supported and selected by rarity per column unless mergeFloatingChildBiomes is enabled.")
+ private List children = List.of();
+
+ public FloatingChildSettings() {
+ }
+
+ public FloatingChildSettings(List children) {
+ this.children = List.copyOf(children);
+ }
+
+ public List children() {
+ return children == null ? List.of() : Collections.unmodifiableList(children);
+ }
+
+ @Override
+ public Set usedBiomes(Collection dimension) {
+ CarvingSettings carving = dimension.stream().filter(CarvingSettings.class::isInstance).map(CarvingSettings.class::cast).findFirst().orElse(null);
+ Set biomes = new LinkedHashSet<>();
+ for (FloatingChildBiome child : children()) {
+ if (child != null) {
+ biomes.add(child.biome());
+ biomes.add(carving == null ? child.carving() : carving.biomeOf(child.carving()));
+ }
+ }
+ return biomes;
+ }
+}
diff --git a/src/main/java/art/arcane/iris/builtin/floating/MergeFloatingChildrenSettings.java b/src/main/java/art/arcane/iris/builtin/floating/MergeFloatingChildrenSettings.java
new file mode 100644
index 000000000..24224b836
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/floating/MergeFloatingChildrenSettings.java
@@ -0,0 +1,43 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.builtin.floating;
+
+import com.volmit.FeatureAttachment.Target;
+import com.volmit.IrisFeature;
+import com.volmit.config.Desc;
+import com.volmit.config.Feature;
+
+/** A biome's {@code mergeFloatingChildBiomes}, written as the bare boolean. */
+@Desc("When true, every floating child entry is sampled independently and their solid masks are unioned, so multiple floating islands can stack, overlap, and collide instead of the picker choosing only one child per column.")
+@Feature(id = "iris:floating/merge", name = "Merge floating child biomes", key = "mergeFloatingChildBiomes", root = "merge", targets = Target.BIOME)
+public final class MergeFloatingChildrenSettings implements IrisFeature {
+ @Desc("When true, every floating child entry is sampled independently and their solid masks are unioned, so multiple floating islands can stack, overlap, and collide instead of the picker choosing only one child per column.")
+ private boolean merge = false;
+
+ public MergeFloatingChildrenSettings() {
+ }
+
+ public MergeFloatingChildrenSettings(boolean merge) {
+ this.merge = merge;
+ }
+
+ public boolean merge() {
+ return merge;
+ }
+}
diff --git a/src/main/java/art/arcane/iris/builtin/terrain/HideOresSettings.java b/src/main/java/art/arcane/iris/builtin/terrain/HideOresSettings.java
new file mode 100644
index 000000000..afebc3443
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/terrain/HideOresSettings.java
@@ -0,0 +1,46 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.builtin.terrain;
+
+import com.volmit.FeatureAttachment.Target;
+import com.volmit.IrisFeature;
+import com.volmit.config.Desc;
+import com.volmit.config.Feature;
+
+/**
+ * A dimension's {@code hideOresForHiddenOre}: whether every ore block the generator would place is replaced with its base
+ * material. Written as the bare boolean.
+ */
+@Desc("When true, every ore block the generator would place (terrain ores, deposits, ores inside objects) is replaced with its base material such as stone, deepslate or netherrack, so drop-control plugins like HiddenOre can manage ore rewards themselves")
+@Feature(id = "iris:terrain/hide-ores", name = "Hide ores", key = "hideOresForHiddenOre", root = "hide", targets = Target.DIMENSION)
+public final class HideOresSettings implements IrisFeature {
+ @Desc("When true, every ore block the generator would place (terrain ores, deposits, ores inside objects) is replaced with its base material such as stone, deepslate or netherrack, so drop-control plugins like HiddenOre can manage ore rewards themselves")
+ private boolean hide = false;
+
+ public HideOresSettings() {
+ }
+
+ public HideOresSettings(boolean hide) {
+ this.hide = hide;
+ }
+
+ public boolean hide() {
+ return hide;
+ }
+}
diff --git a/src/main/java/art/arcane/iris/builtin/terrain/OreGenerator.java b/src/main/java/art/arcane/iris/builtin/terrain/OreGenerator.java
new file mode 100644
index 000000000..1f9cb8f47
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/terrain/OreGenerator.java
@@ -0,0 +1,80 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.builtin.terrain;
+
+import com.volmit.block.PaletteSpec;
+import com.volmit.config.Desc;
+import com.volmit.config.MaxNumber;
+import com.volmit.config.MinNumber;
+import com.volmit.config.Range;
+import com.volmit.noise.NoiseStyle;
+
+import java.util.List;
+
+/**
+ * One ore generator of a dimension, region or biome, an entry of its {@code ores} list: single ore blocks scattered
+ * through the terrain by a noise field, in a vertical band. A value of IrisApi types only; the terrain module resolves
+ * its blocks and builds its noise ({@code ResolvedOre}).
+ */
+@Desc("Scatters single ore blocks through terrain by sampling a noise field at every block in a vertical band. Defined on dimensions, regions, or biomes; the most specific level wins.")
+public final class OreGenerator {
+ private static final double DEFAULT_THRESHOLD = 0.5;
+ private static final double DEFAULT_RANGE_MIN = 30;
+ private static final double DEFAULT_RANGE_MAX = 80;
+
+ @Desc("The ore blocks to place. An empty palette generates nothing, so this must be set for the generator to have any effect.")
+ private PaletteSpec palette = PaletteSpec.of(List.of());
+
+ @Desc("The noise style sampled per block to decide where ore appears. STATIC gives independent random speckle; smoother styles give veiny clusters.")
+ private NoiseStyle chanceStyle = NoiseStyle.of("STATIC");
+
+ @Desc("When true this generator also replaces surface-layer blocks (it runs before layers and fluid); when false it only replaces underground rock.")
+ private boolean generateSurface = false;
+
+ @MinNumber(0)
+ @MaxNumber(1)
+ @Desc("Noise cutoff: a block becomes ore when the sampled noise is at or below this value, so higher means more ore. 0 disables, 1 replaces everything in range.")
+ private double threshold = DEFAULT_THRESHOLD;
+
+ @Desc("Vertical band (min, max) this ore can generate in, in engine-local Y where 0 is the bottom of the dimension, not world Y.")
+ private Range range = Range.of(DEFAULT_RANGE_MIN, DEFAULT_RANGE_MAX);
+
+ public OreGenerator() {
+ }
+
+ public PaletteSpec palette() {
+ return palette;
+ }
+
+ public NoiseStyle chanceStyle() {
+ return chanceStyle;
+ }
+
+ public boolean generateSurface() {
+ return generateSurface;
+ }
+
+ public double threshold() {
+ return threshold;
+ }
+
+ public Range range() {
+ return range;
+ }
+}
diff --git a/src/main/java/art/arcane/iris/builtin/terrain/OreSettings.java b/src/main/java/art/arcane/iris/builtin/terrain/OreSettings.java
new file mode 100644
index 000000000..ae2d39553
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/terrain/OreSettings.java
@@ -0,0 +1,52 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.builtin.terrain;
+
+import com.volmit.FeatureAttachment.Target;
+import com.volmit.IrisFeature;
+import com.volmit.config.Desc;
+import com.volmit.config.Feature;
+import com.volmit.config.MinItems;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * The ore generators one dimension, region or biome declares, written as {@code "ores": [...]}, the list of generators.
+ * Levels stack: a column's ores come from its biome first, then its region, then the dimension. IrisApi types only,
+ * like {@link OreGenerator}.
+ */
+@Desc("Collection of ores to be generated")
+@Feature(id = "iris:terrain/ores", name = "Ores", key = "ores", root = "generators", targets = {Target.DIMENSION, Target.REGION, Target.BIOME})
+public final class OreSettings implements IrisFeature {
+ @MinItems(1)
+ @Desc("Collection of ores to be generated")
+ private List generators = List.of();
+
+ public OreSettings() {
+ }
+
+ public OreSettings(List generators) {
+ this.generators = List.copyOf(generators);
+ }
+
+ public List generators() {
+ return generators == null ? List.of() : Collections.unmodifiableList(generators);
+ }
+}
diff --git a/src/main/java/art/arcane/iris/engine/actuator/HiddenOres.java b/src/main/java/art/arcane/iris/engine/actuator/HiddenOres.java
new file mode 100644
index 000000000..48b5a3535
--- /dev/null
+++ b/src/main/java/art/arcane/iris/engine/actuator/HiddenOres.java
@@ -0,0 +1,32 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.engine.actuator;
+
+import art.arcane.iris.builtin.terrain.HideOresSettings;
+import art.arcane.iris.engine.object.world.dimension.IrisDimension;
+
+/** Whether a dimension hides its ores ({@code hideOresForHiddenOre}): the terrain places none and the perfection pass turns the rest into their base blocks. */
+public final class HiddenOres {
+ private HiddenOres() {
+ }
+
+ public static boolean in(IrisDimension dimension) {
+ return dimension.getModuleSettings().find(HideOresSettings.class).map(HideOresSettings::hide).orElse(false);
+ }
+}
diff --git a/src/main/java/art/arcane/iris/engine/actuator/OreWarmUp.java b/src/main/java/art/arcane/iris/engine/actuator/OreWarmUp.java
index 0e5bbbaf9..11935ef1f 100644
--- a/src/main/java/art/arcane/iris/engine/actuator/OreWarmUp.java
+++ b/src/main/java/art/arcane/iris/engine/actuator/OreWarmUp.java
@@ -19,55 +19,52 @@
package art.arcane.iris.engine.actuator;
import art.arcane.iris.engine.framework.Engine;
-import art.arcane.iris.engine.object.terrain.deposit.IrisOreGenerator;
import art.arcane.iris.engine.object.world.biome.IrisBiome;
import art.arcane.iris.engine.object.world.region.IrisRegion;
import art.arcane.volmlib.util.collection.KList;
import art.arcane.volmlib.util.math.RNG;
import java.util.Comparator;
+import java.util.function.LongSupplier;
/**
* Builds the noise of every ore generator the world's biomes, regions and dimension declare before generation needs it.
- * A generator keeps the noise of the first random it is given, so each one is warmed with the random of its place in
+ * A generator keeps the noise of the first seed it is given, so each one is warmed with the seed of its place in
* this order: the biomes by key, the regions by key, then the dimension. The order is part of what a world generates.
*/
final class OreWarmUp {
private static final long ROOT_SEED_SALT = 7777L;
private final Engine engine;
+ private final TerrainOres ores;
private final RNG root;
private int warmed;
OreWarmUp(Engine engine) {
+ this(engine, TerrainOres.of(engine));
+ }
+
+ OreWarmUp(Engine engine, TerrainOres ores) {
this.engine = engine;
+ this.ores = ores;
this.root = new RNG(engine.getSeedManager().getComponent() + ROOT_SEED_SALT);
}
void warm() {
+ LongSupplier seeds = () -> root.nextParallelRNG(warmed++).getSeed();
+
KList biomes = engine.getAllBiomes();
biomes.sort(Comparator.comparing(IrisBiome::getLoadKey));
for (IrisBiome biome : biomes) {
- warmAll(biome.getOres());
+ ores.of(biome).warm(seeds);
}
KList regions = engine.getDimension().getAllRegions(engine);
regions.sort(Comparator.comparing(IrisRegion::getLoadKey));
for (IrisRegion region : regions) {
- warmAll(region.getOres());
+ ores.of(region).warm(seeds);
}
- warmAll(engine.getDimension().getOres());
- }
-
- private void warmAll(KList ores) {
- if (ores == null) {
- return;
- }
- for (IrisOreGenerator ore : ores) {
- if (ore != null) {
- ore.warm(root.nextParallelRNG(warmed++), engine.getData());
- }
- }
+ ores.of(engine.getDimension()).warm(seeds);
}
}
diff --git a/src/main/java/art/arcane/iris/engine/actuator/ResolvedOre.java b/src/main/java/art/arcane/iris/engine/actuator/ResolvedOre.java
new file mode 100644
index 000000000..721dbbb0c
--- /dev/null
+++ b/src/main/java/art/arcane/iris/engine/actuator/ResolvedOre.java
@@ -0,0 +1,133 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.engine.actuator;
+
+import art.arcane.iris.builtin.terrain.OreGenerator;
+import art.arcane.iris.engine.data.cache.AtomicCache;
+import art.arcane.iris.engine.framework.Engine;
+import art.arcane.iris.spi.PlatformBlockState;
+import art.arcane.iris.util.common.data.B;
+import com.volmit.block.BlockRegistry;
+import com.volmit.block.BlockSpec;
+import com.volmit.block.PaletteSampler;
+import com.volmit.noise.NoiseFactory;
+import com.volmit.noise.NoiseSampler;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * One {@link OreGenerator} made ready for one world: its palette resolved to the platform's blocks and the noise that
+ * decides where it places ore, built from the seed it is warmed with or, when nothing warmed it, from the terrain seed
+ * of its first use. The palette picks with the terrain seed. What the generator describes stays in the settings;
+ * everything that needs the platform, the pack or the world seed is here.
+ */
+final class ResolvedOre {
+ private final OreGenerator settings;
+ private final NoiseFactory noise;
+ private final BlockRegistry blockRegistry;
+ private final long terrainSeed;
+ private final List blocks;
+ private final AtomicCache chance = new AtomicCache<>();
+ private final AtomicCache palette = new AtomicCache<>();
+
+ /**
+ * @param terrainSeed the seed the palette picks with, and the noise is built from when nothing warmed it first
+ * @param blocks the palette as the platform's blocks, each repeated by its weight
+ */
+ ResolvedOre(OreGenerator settings, NoiseFactory noise, BlockRegistry blockRegistry, long terrainSeed, List blocks) {
+ this.settings = settings;
+ this.noise = noise;
+ this.blockRegistry = blockRegistry;
+ this.terrainSeed = terrainSeed;
+ this.blocks = List.copyOf(blocks);
+ }
+
+ /** {@code settings} ready for {@code engine}: its blocks resolved through the pack, its picks seeded with the terrain seed. */
+ static ResolvedOre of(OreGenerator settings, Engine engine) {
+ var resources = engine.getData().getPackResources();
+ BlockRegistry registry = resources.blocks();
+ return new ResolvedOre(settings, resources.noise(), registry, engine.getSeedManager().getTerrain(), weighted(registry, settings.palette().palette()));
+ }
+
+ private static List weighted(BlockRegistry registry, List specs) {
+ List weighted = new ArrayList<>();
+ for (BlockSpec spec : specs) {
+ PlatformBlockState state = B.getState(registry.resolve(spec).key());
+ if (state == null) {
+ continue;
+ }
+ for (int n = 0; n < spec.weight(); n++) {
+ weighted.add(state);
+ }
+ }
+ return weighted;
+ }
+
+ boolean generatesSurface() {
+ return settings.generateSurface();
+ }
+
+ double minY() {
+ return settings.range().min();
+ }
+
+ double maxY() {
+ return settings.range().max();
+ }
+
+ /** Builds the chance noise from {@code seed}, unless it is built already: the first seed it is given is the one it keeps. */
+ void warm(long seed) {
+ chance.aquire(() -> noise.sampler(settings.chanceStyle(), seed));
+ }
+
+ /** The ore block at the position, or null when the position is out of the band, the chance noise is above the threshold or the palette has no block. */
+ PlatformBlockState generate(int x, int y, int z) {
+ if (!settings.range().contains(y)) {
+ return null;
+ }
+ if (settings.palette().palette().isEmpty()) {
+ return null;
+ }
+ if (chanceNoise().sample(x, y, z) > settings.threshold()) {
+ return null;
+ }
+ return pick(x, y, z);
+ }
+
+ /** The chance noise, which this runs per block of the terrain, so a built one is read without creating a supplier. */
+ private NoiseSampler chanceNoise() {
+ NoiseSampler built = chance.getIfPresent();
+ if (built != null) {
+ return built;
+ }
+ return chance.aquire(() -> noise.sampler(settings.chanceStyle(), terrainSeed));
+ }
+
+ private PlatformBlockState pick(int x, int y, int z) {
+ if (blocks.isEmpty()) {
+ return null;
+ }
+ if (blocks.size() == 1) {
+ return blocks.getFirst();
+ }
+ PaletteSampler sampler = palette.aquire(() -> blockRegistry.palette(settings.palette(), terrainSeed));
+ return B.getState(sampler.at(x, y, z).key());
+ }
+}
diff --git a/src/main/java/art/arcane/iris/engine/actuator/ResolvedOres.java b/src/main/java/art/arcane/iris/engine/actuator/ResolvedOres.java
new file mode 100644
index 000000000..e3df4ad35
--- /dev/null
+++ b/src/main/java/art/arcane/iris/engine/actuator/ResolvedOres.java
@@ -0,0 +1,119 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.engine.actuator;
+
+import art.arcane.iris.builtin.terrain.OreGenerator;
+import art.arcane.iris.builtin.terrain.OreSettings;
+import art.arcane.iris.engine.framework.Engine;
+import art.arcane.iris.spi.PlatformBlockState;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.function.LongSupplier;
+
+/**
+ * The ore generators of one dimension, region or biome made ready ({@link ResolvedOre}), in the order its settings list them
+ * and split into the ones that also replace surface blocks and the ones that only replace rock. A level without ores is
+ * {@link #NONE}.
+ */
+final class ResolvedOres {
+ static final ResolvedOres NONE = new ResolvedOres(List.of());
+
+ private final List all;
+ private final List surface;
+ private final List underground;
+ private final YBand surfaceBand;
+ private final YBand undergroundBand;
+
+ ResolvedOres(List all) {
+ this.all = List.copyOf(all);
+ this.surface = this.all.stream().filter(ResolvedOre::generatesSurface).toList();
+ this.underground = this.all.stream().filter(ore -> !ore.generatesSurface()).toList();
+ this.surfaceBand = YBand.of(surface);
+ this.undergroundBand = YBand.of(underground);
+ }
+
+ /** {@code settings} ready for {@code engine}; generators the pack wrote as {@code null} are left out. */
+ static ResolvedOres of(OreSettings settings, Engine engine) {
+ List ores = new ArrayList<>();
+ for (OreGenerator generator : settings.generators()) {
+ if (generator != null) {
+ ores.add(ResolvedOre.of(generator, engine));
+ }
+ }
+ return ores.isEmpty() ? NONE : new ResolvedOres(ores);
+ }
+
+ /** The heights where any surface ore can generate. */
+ YBand surfaceBand() {
+ return surfaceBand;
+ }
+
+ /** The heights where any rock-only ore can generate. */
+ YBand undergroundBand() {
+ return undergroundBand;
+ }
+
+ /** Warms every ore in the order the settings list them, each with the next seed. */
+ void warm(LongSupplier seeds) {
+ for (ResolvedOre ore : all) {
+ ore.warm(seeds.getAsLong());
+ }
+ }
+
+ PlatformBlockState generateSurface(int x, int y, int z) {
+ return firstOre(surface, x, y, z);
+ }
+
+ PlatformBlockState generateUnderground(int x, int y, int z) {
+ return firstOre(underground, x, y, z);
+ }
+
+ private static PlatformBlockState firstOre(List ores, int x, int y, int z) {
+ for (int index = 0; index < ores.size(); index++) {
+ PlatformBlockState ore = ores.get(index).generate(x, y, z);
+ if (ore != null) {
+ return ore;
+ }
+ }
+ return null;
+ }
+
+ /** The lowest and highest height any of a set of ores reaches; empty when there are none. */
+ record YBand(boolean hasOres, double min, double max) {
+ static final YBand EMPTY = new YBand(false, 0, 0);
+
+ static YBand of(List ores) {
+ if (ores.isEmpty()) {
+ return EMPTY;
+ }
+ double min = Double.POSITIVE_INFINITY;
+ double max = Double.NEGATIVE_INFINITY;
+ for (ResolvedOre ore : ores) {
+ min = Math.min(min, ore.minY());
+ max = Math.max(max, ore.maxY());
+ }
+ return new YBand(true, min, max);
+ }
+
+ boolean contains(int y) {
+ return hasOres && y >= min && y <= max;
+ }
+ }
+}
diff --git a/src/main/java/art/arcane/iris/engine/actuator/TerrainModule.java b/src/main/java/art/arcane/iris/engine/actuator/TerrainModule.java
index e0068796d..279980029 100644
--- a/src/main/java/art/arcane/iris/engine/actuator/TerrainModule.java
+++ b/src/main/java/art/arcane/iris/engine/actuator/TerrainModule.java
@@ -28,14 +28,15 @@ import art.arcane.iris.builtin.terrain.RockPaletteSettings;
import art.arcane.iris.builtin.terrain.SeaLayersSettings;
import art.arcane.iris.builtin.terrain.SlabSettings;
import art.arcane.iris.builtin.terrain.WallSettings;
+import art.arcane.iris.builtin.terrain.HideOresSettings;
+import art.arcane.iris.builtin.terrain.OreSettings;
import art.arcane.iris.core.loader.IrisData;
import art.arcane.iris.core.modules.IrisChunk;
import art.arcane.iris.core.modules.IrisPackWorld;
import art.arcane.iris.engine.IrisComplex;
import art.arcane.iris.engine.UpperDimensionContext;
+import art.arcane.iris.engine.actuator.ResolvedOres.YBand;
import art.arcane.iris.engine.framework.Engine;
-import art.arcane.iris.engine.object.terrain.deposit.IrisOreGenerator;
-import art.arcane.iris.engine.object.terrain.deposit.IrisOreGeneratorBounds;
import art.arcane.iris.engine.object.world.biome.IrisBiome;
import art.arcane.iris.engine.object.world.dimension.IrisDimension;
import art.arcane.iris.engine.object.world.region.IrisRegion;
@@ -83,6 +84,8 @@ public final class TerrainModule implements IrisModule, ModuleLifecycle {
registry.registerSettings(LockLayersMaxSettings.class);
registry.registerSettings(RockPaletteSettings.class);
registry.registerSettings(FluidPaletteSettings.class);
+ registry.registerSettings(OreSettings.class);
+ registry.registerSettings(HideOresSettings.class);
registry.registerLifecycle(this);
}
@@ -110,16 +113,18 @@ public final class TerrainModule implements IrisModule, ModuleLifecycle {
private final Engine engine;
private final TerrainPalettes palettes;
private final BiomeLayers layers;
+ private final TerrainOres ores;
private final RNG rng;
TerrainShaper(Engine engine) {
- this(engine, TerrainPalettes.of(engine), BiomeLayers.of(engine));
+ this(engine, TerrainPalettes.of(engine), BiomeLayers.of(engine), TerrainOres.of(engine));
}
- TerrainShaper(Engine engine, TerrainPalettes palettes, BiomeLayers layers) {
+ TerrainShaper(Engine engine, TerrainPalettes palettes, BiomeLayers layers, TerrainOres ores) {
this.engine = engine;
this.palettes = palettes;
this.layers = layers;
+ this.ores = ores;
this.rng = new RNG(engine.getSeedManager().getTerrain());
}
@@ -145,17 +150,16 @@ public final class TerrainModule implements IrisModule, ModuleLifecycle {
int fluidHeight = dimension.getFluidHeight();
int clampedFluidHeight = Math.min(chunkHeight, fluidHeight);
boolean bedrockEnabled = dimension.isBedrock();
- boolean hideOres = dimension.isHideOresForHiddenOre();
+ boolean hideOres = HiddenOres.in(dimension);
ChunkedDataCache biomeCache = context.getBiome();
ChunkedDataCache regionCache = context.getRegion();
int realX = xf + x;
UpperDimensionContext upperContext = engine.getUpperContext();
// Dimension-level ore lookups are chunk-invariant; resolving them per column paid
- // four accessor chains times 256 per chunk for constants.
- KList dimensionSurfaceOres = hideOres ? null : dimension.getSurfaceOreGenerators();
- KList dimensionUndergroundOres = hideOres ? null : dimension.getUndergroundOreGenerators();
- IrisOreGeneratorBounds dimensionSurfaceOreBounds = hideOres ? IrisOreGeneratorBounds.EMPTY : dimension.getSurfaceOreGeneratorBounds();
- IrisOreGeneratorBounds dimensionUndergroundOreBounds = hideOres ? IrisOreGeneratorBounds.EMPTY : dimension.getUndergroundOreGeneratorBounds();
+ // the settings lookup times 256 per chunk for a constant.
+ ResolvedOres dimensionOres = hideOres ? ResolvedOres.NONE : ores.of(dimension);
+ YBand dimensionSurfaceBand = dimensionOres.surfaceBand();
+ YBand dimensionUndergroundBand = dimensionOres.undergroundBand();
for (int zf = 0; zf < chunkDepth; zf++) {
int realZ = zf + z;
@@ -171,16 +175,14 @@ public final class TerrainModule implements IrisModule, ModuleLifecycle {
PlatformBlockState fluid = palettes.fluidAt(realX, realZ);
PlatformBlockState rock = palettes.rockAt(realX, realZ);
PlatformBlockState mappedSurfaceBlock = complex.getImageMapRuntime().sampleSurfaceBlock(realX, realZ);
- KList biomeSurfaceOres = hideOres ? null : biome.getSurfaceOreGenerators();
- KList regionSurfaceOres = hideOres ? null : region.getSurfaceOreGenerators();
- KList biomeUndergroundOres = hideOres ? null : biome.getUndergroundOreGenerators();
- KList regionUndergroundOres = hideOres ? null : region.getUndergroundOreGenerators();
- IrisOreGeneratorBounds biomeSurfaceOreBounds = hideOres ? IrisOreGeneratorBounds.EMPTY : biome.getSurfaceOreGeneratorBounds();
- IrisOreGeneratorBounds regionSurfaceOreBounds = hideOres ? IrisOreGeneratorBounds.EMPTY : region.getSurfaceOreGeneratorBounds();
- IrisOreGeneratorBounds biomeUndergroundOreBounds = hideOres ? IrisOreGeneratorBounds.EMPTY : biome.getUndergroundOreGeneratorBounds();
- IrisOreGeneratorBounds regionUndergroundOreBounds = hideOres ? IrisOreGeneratorBounds.EMPTY : region.getUndergroundOreGeneratorBounds();
- boolean hasSurfaceOres = biomeSurfaceOreBounds.hasOres() || regionSurfaceOreBounds.hasOres() || dimensionSurfaceOreBounds.hasOres();
- boolean hasUndergroundOres = biomeUndergroundOreBounds.hasOres() || regionUndergroundOreBounds.hasOres() || dimensionUndergroundOreBounds.hasOres();
+ ResolvedOres biomeOres = hideOres ? ResolvedOres.NONE : ores.of(biome);
+ ResolvedOres regionOres = hideOres ? ResolvedOres.NONE : ores.of(region);
+ YBand biomeSurfaceBand = biomeOres.surfaceBand();
+ YBand regionSurfaceBand = regionOres.surfaceBand();
+ YBand biomeUndergroundBand = biomeOres.undergroundBand();
+ YBand regionUndergroundBand = regionOres.undergroundBand();
+ boolean hasSurfaceOres = biomeSurfaceBand.hasOres() || regionSurfaceBand.hasOres() || dimensionSurfaceBand.hasOres();
+ boolean hasUndergroundOres = biomeUndergroundBand.hasOres() || regionUndergroundBand.hasOres() || dimensionUndergroundBand.hasOres();
KList blocks = null;
KList fblocks = null;
@@ -192,14 +194,14 @@ public final class TerrainModule implements IrisModule, ModuleLifecycle {
PlatformBlockState ore = null;
if (hasSurfaceOres) {
- if (biomeSurfaceOreBounds.contains(i)) {
- ore = generateOres(biomeSurfaceOres, realX, i, realZ, localRng, data);
+ if (biomeSurfaceBand.contains(i)) {
+ ore = biomeOres.generateSurface(realX, i, realZ);
}
- if (ore == null && regionSurfaceOreBounds.contains(i)) {
- ore = generateOres(regionSurfaceOres, realX, i, realZ, localRng, data);
+ if (ore == null && regionSurfaceBand.contains(i)) {
+ ore = regionOres.generateSurface(realX, i, realZ);
}
- if (ore == null && dimensionSurfaceOreBounds.contains(i)) {
- ore = generateOres(dimensionSurfaceOres, realX, i, realZ, localRng, data);
+ if (ore == null && dimensionSurfaceBand.contains(i)) {
+ ore = dimensionOres.generateSurface(realX, i, realZ);
}
}
if (ore != null) {
@@ -237,14 +239,14 @@ public final class TerrainModule implements IrisModule, ModuleLifecycle {
}
if (hasUndergroundOres) {
- if (biomeUndergroundOreBounds.contains(i)) {
- ore = generateOres(biomeUndergroundOres, realX, i, realZ, localRng, data);
+ if (biomeUndergroundBand.contains(i)) {
+ ore = biomeOres.generateUnderground(realX, i, realZ);
}
- if (ore == null && regionUndergroundOreBounds.contains(i)) {
- ore = generateOres(regionUndergroundOres, realX, i, realZ, localRng, data);
+ if (ore == null && regionUndergroundBand.contains(i)) {
+ ore = regionOres.generateUnderground(realX, i, realZ);
}
- if (ore == null && dimensionUndergroundOreBounds.contains(i)) {
- ore = generateOres(dimensionUndergroundOres, realX, i, realZ, localRng, data);
+ if (ore == null && dimensionUndergroundBand.contains(i)) {
+ ore = dimensionOres.generateUnderground(realX, i, realZ);
}
}
@@ -292,22 +294,5 @@ public final class TerrainModule implements IrisModule, ModuleLifecycle {
}
}
}
-
- private PlatformBlockState generateOres(KList oreGenerators, int x, int y, int z, RNG rng, IrisData data) {
- if (oreGenerators == null || oreGenerators.isEmpty()) {
- return null;
- }
-
- int oreCount = oreGenerators.size();
- for (int oreIndex = 0; oreIndex < oreCount; oreIndex++) {
- IrisOreGenerator oreGenerator = oreGenerators.get(oreIndex);
- PlatformBlockState ore = oreGenerator.generate(x, y, z, rng, data);
- if (ore != null) {
- return ore;
- }
- }
-
- return null;
- }
}
}
diff --git a/src/main/java/art/arcane/iris/engine/actuator/TerrainOres.java b/src/main/java/art/arcane/iris/engine/actuator/TerrainOres.java
new file mode 100644
index 000000000..1eb73d719
--- /dev/null
+++ b/src/main/java/art/arcane/iris/engine/actuator/TerrainOres.java
@@ -0,0 +1,60 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.engine.actuator;
+
+import art.arcane.iris.builtin.terrain.OreSettings;
+import art.arcane.iris.core.loader.IrisRegistrant;
+import art.arcane.iris.engine.framework.Engine;
+
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * What the terrain module keeps for one world: the ore generators of its dimension, regions and biomes made ready
+ * ({@link ResolvedOres}), built from their {@link OreSettings} when first asked for or ahead of generation by {@link OreWarmUp}.
+ */
+final class TerrainOres {
+ private final Engine engine;
+ private final Map resolved = new ConcurrentHashMap<>();
+
+ TerrainOres(Engine engine) {
+ this.engine = engine;
+ }
+
+ /** The ores of the world {@code engine} generates now. */
+ static TerrainOres of(Engine engine) {
+ return engine.getGeneration().state(TerrainOres.class, TerrainOres::new);
+ }
+
+ /**
+ * The ore generators {@code owner}, a dimension, region or biome, declares; {@link ResolvedOres#NONE} when it declares none. The
+ * terrain asks this for two owners per column, so a resolved set is read without taking the map's lock.
+ */
+ ResolvedOres of(IrisRegistrant owner) {
+ OreSettings settings = owner.getModuleSettings().find(OreSettings.class).orElse(null);
+ if (settings == null) {
+ return ResolvedOres.NONE;
+ }
+ ResolvedOres existing = resolved.get(settings);
+ if (existing != null) {
+ return existing;
+ }
+ return resolved.computeIfAbsent(settings, declared -> ResolvedOres.of(declared, engine));
+ }
+}
diff --git a/src/main/java/art/arcane/iris/engine/mantle/components/CaveCarving.java b/src/main/java/art/arcane/iris/engine/mantle/components/CaveCarving.java
index 9ece76776..7046d1da8 100644
--- a/src/main/java/art/arcane/iris/engine/mantle/components/CaveCarving.java
+++ b/src/main/java/art/arcane/iris/engine/mantle/components/CaveCarving.java
@@ -19,14 +19,18 @@
package art.arcane.iris.engine.mantle.components;
import art.arcane.iris.builtin.carve.CaveProfile;
+import art.arcane.iris.core.modules.IrisValues;
import art.arcane.iris.engine.IrisComplex;
import art.arcane.iris.engine.UpperDimensionContext;
import art.arcane.iris.engine.framework.Engine;
import art.arcane.iris.engine.mantle.MantleWriter;
import art.arcane.iris.engine.terrain.TerrainPalettes;
+import art.arcane.iris.engine.object.terrain.carving.CaveProfiles;
import art.arcane.iris.engine.object.world.biome.IrisBiome;
-import art.arcane.iris.engine.object.terrain.carving.IrisDimensionCarvingEntry;
-import art.arcane.iris.engine.object.terrain.carving.IrisDimensionCarvingResolver;
+import art.arcane.iris.engine.object.terrain.carving.ResolvedCarvingEntry;
+import art.arcane.iris.engine.modifier.CaveBiomeBands;
+import art.arcane.iris.engine.object.terrain.carving.CarvingBands;
+import art.arcane.iris.engine.object.terrain.carving.CarvingResolver;
import art.arcane.iris.engine.object.world.region.IrisRegion;
import art.arcane.iris.engine.object.value.IrisRange;
import art.arcane.iris.spi.PlatformBlockState;
@@ -90,7 +94,7 @@ public class CaveCarving {
/** Carves the caves of the chunk at chunk coordinates {@code x}, {@code z} into {@code writer}. */
public void carve(MantleWriter writer, int x, int z, ChunkContext context) {
IrisComplex complex = context.getComplex();
- IrisDimensionCarvingResolver.State resolverState = new IrisDimensionCarvingResolver.State();
+ CarvingResolver.State resolverState = new CarvingResolver.State();
BlendScratch blendScratch = BLEND_SCRATCH.get();
int[] chunkSurfaceHeights = prepareChunkSurfaceHeights(x, z, context, blendScratch.chunkSurfaceHeights);
PrecisionStopwatch resolveStopwatch = PrecisionStopwatch.start();
@@ -201,7 +205,7 @@ public class CaveCarving {
}
}
- private List resolveWeightedProfiles(int chunkX, int chunkZ, IrisComplex complex, IrisDimensionCarvingResolver.State resolverState) {
+ private List resolveWeightedProfiles(int chunkX, int chunkZ, IrisComplex complex, CarvingResolver.State resolverState) {
BlendScratch blendScratch = BLEND_SCRATCH.get();
CaveProfile[] profileField = blendScratch.profileField;
Map columnProfileWeights = blendScratch.columnProfileWeights;
@@ -297,40 +301,40 @@ public class CaveCarving {
return resolvedProfiles;
}
- private List resolveDimensionCarvingProfiles(int chunkX, int chunkZ, IrisDimensionCarvingResolver.State resolverState, BlendScratch blendScratch) {
+ private List resolveDimensionCarvingProfiles(int chunkX, int chunkZ, CarvingResolver.State resolverState, BlendScratch blendScratch) {
List weightedProfiles = new ArrayList<>();
- List entries = engine.getDimension().getCarving();
- if (entries == null || entries.isEmpty()) {
+ List entries = CarvingBands.of(engine).entries();
+ if (entries.isEmpty()) {
return weightedProfiles;
}
- Map dimensionColumnPlans = blendScratch.dimensionColumnPlans;
+ Map dimensionColumnPlans = blendScratch.dimensionColumnPlans;
dimensionColumnPlans.clear();
- for (IrisDimensionCarvingEntry entry : entries) {
- if (entry == null || !entry.isEnabled()) {
+ for (ResolvedCarvingEntry entry : entries) {
+ if (!entry.enabled()) {
continue;
}
- IrisBiome rootBiome = IrisDimensionCarvingResolver.resolveEntryBiome(engine, entry, resolverState);
+ IrisBiome rootBiome = CarvingResolver.resolveEntryBiome(engine, entry, resolverState);
if (rootBiome == null) {
continue;
}
- IrisDimensionCarvingEntry[] columnPlan = dimensionColumnPlans.computeIfAbsent(entry, key -> new IrisDimensionCarvingEntry[CHUNK_AREA]);
+ ResolvedCarvingEntry[] columnPlan = dimensionColumnPlans.computeIfAbsent(entry, key -> new ResolvedCarvingEntry[CHUNK_AREA]);
buildDimensionColumnPlan(columnPlan, chunkX, chunkZ, entry, resolverState);
Map rootProfileColumnWeights = new IdentityHashMap<>();
List rootProfileOrder = new ArrayList<>();
- IrisRange worldYRange = entry.getWorldYRange();
+ IrisRange worldYRange = entry.worldYRange() == null ? null : IrisValues.range(entry.worldYRange());
for (int columnIndex = 0; columnIndex < CHUNK_AREA; columnIndex++) {
- IrisDimensionCarvingEntry resolvedEntry = columnPlan[columnIndex];
- IrisBiome resolvedBiome = IrisDimensionCarvingResolver.resolveEntryBiome(engine, resolvedEntry, resolverState);
+ ResolvedCarvingEntry resolvedEntry = columnPlan[columnIndex];
+ IrisBiome resolvedBiome = CarvingResolver.resolveEntryBiome(engine, resolvedEntry, resolverState);
if (resolvedBiome == null) {
continue;
}
- CaveProfile profile = resolvedBiome.getCaveProfile();
+ CaveProfile profile = CaveProfiles.declaredBy(resolvedBiome);
if (!isProfileEnabled(profile)) {
continue;
}
@@ -352,7 +356,7 @@ public class CaveCarving {
return weightedProfiles;
}
- private void buildDimensionColumnPlan(IrisDimensionCarvingEntry[] columnPlan, int chunkX, int chunkZ, IrisDimensionCarvingEntry entry, IrisDimensionCarvingResolver.State resolverState) {
+ private void buildDimensionColumnPlan(ResolvedCarvingEntry[] columnPlan, int chunkX, int chunkZ, ResolvedCarvingEntry entry, CarvingResolver.State resolverState) {
int baseX = PowerOfTwoCoordinates.chunkToBlock(chunkX);
int baseZ = PowerOfTwoCoordinates.chunkToBlock(chunkZ);
for (int localX = 0; localX < CHUNK_SIZE; localX++) {
@@ -360,12 +364,12 @@ public class CaveCarving {
for (int localZ = 0; localZ < CHUNK_SIZE; localZ++) {
int worldZ = baseZ + localZ;
int columnIndex = PowerOfTwoCoordinates.packLocal16(localX, localZ);
- columnPlan[columnIndex] = IrisDimensionCarvingResolver.resolveFromRoot(engine, entry, worldX, worldZ, resolverState);
+ columnPlan[columnIndex] = CarvingResolver.resolveFromRoot(engine, entry, worldX, worldZ, resolverState);
}
}
}
- private void fillProfileField(CaveProfile[] profileField, int chunkX, int chunkZ, IrisComplex complex, IrisDimensionCarvingResolver.State resolverState, BlendScratch blendScratch) {
+ private void fillProfileField(CaveProfile[] profileField, int chunkX, int chunkZ, IrisComplex complex, CarvingResolver.State resolverState, BlendScratch blendScratch) {
int startX = PowerOfTwoCoordinates.chunkToBlock(chunkX) - BLEND_RADIUS;
int startZ = PowerOfTwoCoordinates.chunkToBlock(chunkZ) - BLEND_RADIUS;
prefillProfileFieldSamples(startX, startZ, complex, blendScratch);
@@ -405,23 +409,23 @@ public class CaveCarving {
IrisRegion region,
IrisBiome surfaceBiome,
IrisBiome caveBiome,
- IrisDimensionCarvingResolver.State resolverState
+ CarvingResolver.State resolverState
) {
CaveProfile resolved = null;
- CaveProfile dimensionProfile = engine.getDimension().getCaveProfile();
+ CaveProfile dimensionProfile = CaveProfiles.declaredBy(engine.getDimension());
if (isProfileEnabled(dimensionProfile)) {
resolved = dimensionProfile;
}
if (region != null) {
- CaveProfile regionProfile = region.getCaveProfile();
+ CaveProfile regionProfile = CaveProfiles.declaredBy(region);
if (isProfileEnabled(regionProfile)) {
resolved = regionProfile;
}
}
if (surfaceBiome != null) {
- CaveProfile surfaceProfile = surfaceBiome.getCaveProfile();
+ CaveProfile surfaceProfile = CaveProfiles.declaredBy(surfaceBiome);
if (isProfileEnabled(surfaceProfile)) {
resolved = surfaceProfile;
}
@@ -430,11 +434,11 @@ public class CaveCarving {
int roundedSurfaceY = (int) Math.round(surfaceHeight);
int sampleY = Math.max(1, roundedSurfaceY - 56);
int worldY = sampleY + engine.getWorld().minHeight();
- IrisDimensionCarvingEntry rootCarvingEntry = IrisDimensionCarvingResolver.resolveRootEntry(engine, worldY, resolverState);
+ ResolvedCarvingEntry rootCarvingEntry = CarvingResolver.resolveRootEntry(engine, worldY, resolverState);
IrisBiome resolvedCarvingBiome = null;
if (rootCarvingEntry != null) {
- IrisDimensionCarvingEntry resolvedCarvingEntry = IrisDimensionCarvingResolver.resolveFromRoot(engine, rootCarvingEntry, worldX, worldZ, resolverState);
- resolvedCarvingBiome = IrisDimensionCarvingResolver.resolveEntryBiome(engine, resolvedCarvingEntry, resolverState);
+ ResolvedCarvingEntry resolvedCarvingEntry = CarvingResolver.resolveFromRoot(engine, rootCarvingEntry, worldX, worldZ, resolverState);
+ resolvedCarvingBiome = CarvingResolver.resolveEntryBiome(engine, resolvedCarvingEntry, resolverState);
if (resolvedCarvingBiome != null) {
caveBiome = resolvedCarvingBiome;
}
@@ -448,7 +452,7 @@ public class CaveCarving {
if (depthBelowSurface <= 0) {
effectiveCaveBiome = surfaceBiome;
} else {
- int minDepth = Math.max(0, caveBiome.getCaveMinDepthBelowSurface());
+ int minDepth = Math.max(0, CaveBiomeBands.minDepthBelowSurface(caveBiome));
if (depthBelowSurface < minDepth) {
effectiveCaveBiome = surfaceBiome;
}
@@ -456,7 +460,7 @@ public class CaveCarving {
}
}
- CaveProfile caveProfile = effectiveCaveBiome.getCaveProfile();
+ CaveProfile caveProfile = CaveProfiles.declaredBy(effectiveCaveBiome);
if (isProfileEnabled(caveProfile)) {
resolved = caveProfile;
}
@@ -681,7 +685,7 @@ public class CaveCarving {
private final CaveProfile[] kernelProfiles = new CaveProfile[KERNEL_SIZE];
private final double[] kernelProfileWeights = new double[KERNEL_SIZE];
private final IdentityHashMap columnProfileWeights = new IdentityHashMap<>();
- private final IdentityHashMap dimensionColumnPlans = new IdentityHashMap<>();
+ private final IdentityHashMap dimensionColumnPlans = new IdentityHashMap<>();
private final IdentityHashMap activeProfiles = new IdentityHashMap<>();
private final List profileOrder = new ArrayList<>();
private final double[] fieldSurfaceHeights = new double[FIELD_SIZE * FIELD_SIZE];
diff --git a/src/main/java/art/arcane/iris/engine/mantle/components/FloatingIslandSampleResolver.java b/src/main/java/art/arcane/iris/engine/mantle/components/FloatingIslandSampleResolver.java
index b80204f93..b45fbe693 100644
--- a/src/main/java/art/arcane/iris/engine/mantle/components/FloatingIslandSampleResolver.java
+++ b/src/main/java/art/arcane/iris/engine/mantle/components/FloatingIslandSampleResolver.java
@@ -23,6 +23,7 @@ import art.arcane.iris.engine.data.cache.Cache;
import art.arcane.iris.engine.framework.Engine;
import art.arcane.iris.engine.mantle.EngineMantle;
import art.arcane.iris.engine.modifier.FloatingIslands;
+import art.arcane.iris.engine.object.terrain.floating.FloatingChildren;
import art.arcane.iris.engine.object.terrain.floating.FloatingIslandBoundarySampler;
import art.arcane.iris.engine.object.terrain.floating.FloatingIslandSample;
import art.arcane.iris.engine.object.world.biome.IrisBiome;
@@ -56,7 +57,7 @@ final class FloatingIslandSampleResolver implements IslandObjectPlacer.SamplePro
return sampleCache.get(key);
}
IrisBiome parent = parent(x, z);
- if (parent == null || parent.getFloatingChildBiomes() == null || parent.getFloatingChildBiomes().isEmpty()) {
+ if (parent == null || FloatingChildren.declaredBy(parent).isEmpty()) {
resolvedSamples.add(key);
return null;
}
diff --git a/src/main/java/art/arcane/iris/engine/mantle/components/FloatingObjectPlacing.java b/src/main/java/art/arcane/iris/engine/mantle/components/FloatingObjectPlacing.java
index 2a74bfb86..6537c02ce 100644
--- a/src/main/java/art/arcane/iris/engine/mantle/components/FloatingObjectPlacing.java
+++ b/src/main/java/art/arcane/iris/engine/mantle/components/FloatingObjectPlacing.java
@@ -543,8 +543,8 @@ public class FloatingObjectPlacing {
try {
IrisData data = engine.getData();
for (IrisBiome biome : engine.getDimension().getReachableBiomes(engine)) {
- List settings = biome.getFloatingChildBiomes();
- if (settings == null || settings.isEmpty()) {
+ List settings = FloatingChildren.declaredBy(biome);
+ if (settings.isEmpty()) {
continue;
}
for (ResolvedFloatingChild entry : FloatingChildren.of(engine).of(settings)) {
diff --git a/src/main/java/art/arcane/iris/engine/mantle/components/ObjectPlacing.java b/src/main/java/art/arcane/iris/engine/mantle/components/ObjectPlacing.java
index 88d18f4b8..80e64d2e1 100644
--- a/src/main/java/art/arcane/iris/engine/mantle/components/ObjectPlacing.java
+++ b/src/main/java/art/arcane/iris/engine/mantle/components/ObjectPlacing.java
@@ -25,6 +25,7 @@ import art.arcane.iris.builtin.carve.CaveAnchorMode;
import art.arcane.iris.builtin.carve.CaveProfile;
import art.arcane.iris.builtin.anchor.ObjectPlaceMode;
import art.arcane.iris.builtin.prepare.AxisRotationClamp;
+import art.arcane.iris.engine.object.terrain.carving.CaveProfiles;
import art.arcane.iris.engine.object.placement.IrisObjectPlacement;
import art.arcane.iris.engine.object.placement.IrisObjectVacuum;
import art.arcane.iris.core.IrisSettings;
@@ -78,6 +79,7 @@ import java.util.concurrent.atomic.AtomicLong;
* placement reach of any object the dimension can place.
*/
public class ObjectPlacing {
+ private static final CaveProfile DEFAULT_CAVE_PROFILE = new CaveProfile();
private static final long CAVE_REJECT_LOG_THROTTLE_MS = 5000L;
private static final int BEDROCK_CLEARANCE = 6;
private static final byte LIQUID_FORCED_AIR = 3;
@@ -235,8 +237,8 @@ public class ObjectPlacing {
int rejected = 0;
int nullObjects = 0;
int errors = 0;
- CaveProfile biomeCaveProfile = resolveCaveProfile(caveBiome.getCaveProfile(), region.getCaveProfile());
- CaveProfile regionCaveProfile = resolveCaveProfile(region.getCaveProfile(), caveBiome.getCaveProfile());
+ CaveProfile biomeCaveProfile = resolveCaveProfile(CaveProfiles.declaredBy(caveBiome), CaveProfiles.declaredBy(region));
+ CaveProfile regionCaveProfile = resolveCaveProfile(CaveProfiles.declaredBy(region), CaveProfiles.declaredBy(caveBiome));
CaveAnchorCache caveAnchorCache = new CaveAnchorCache();
for (IrisObjectPlacement i : surfaceBiome.getSurfaceObjects()) {
@@ -384,12 +386,12 @@ public class ObjectPlacing {
@ChunkCoordinates
private void placeProceduralObjects(MantleWriter writer, RNG rng, int x, int z, IrisBiome surfaceBiome, IrisBiome caveBiome, IrisRegion region) {
- CaveProfile surfaceCaveProfile = resolveCaveProfile(surfaceBiome.getCaveProfile(), region.getCaveProfile());
- CaveProfile regionCaveProfile = resolveCaveProfile(region.getCaveProfile(), caveBiome == null ? null : caveBiome.getCaveProfile());
+ CaveProfile surfaceCaveProfile = resolveCaveProfile(CaveProfiles.declaredBy(surfaceBiome), CaveProfiles.declaredBy(region));
+ CaveProfile regionCaveProfile = resolveCaveProfile(CaveProfiles.declaredBy(region), caveBiome == null ? null : CaveProfiles.declaredBy(caveBiome));
placeProceduralFrom(writer, rng, x, z, surfaceBiome.getProceduralObjects(), surfaceBiome.getName(), surfaceCaveProfile, surfaceBiome.getLoadKey());
placeProceduralFrom(writer, rng, x, z, region.getProceduralObjects(), region.getName(), regionCaveProfile, null);
if (caveBiome != null && caveBiome != surfaceBiome) {
- CaveProfile caveProfile = resolveCaveProfile(caveBiome.getCaveProfile(), region.getCaveProfile());
+ CaveProfile caveProfile = resolveCaveProfile(CaveProfiles.declaredBy(caveBiome), CaveProfiles.declaredBy(region));
placeProceduralFrom(writer, rng, x, z, caveBiome.getProceduralObjects(), caveBiome.getName(), caveProfile, caveBiome.getLoadKey());
}
}
@@ -1319,7 +1321,7 @@ public class ObjectPlacing {
}
private CaveProfile resolveCaveProfile(CaveProfile preferred, CaveProfile secondary) {
- CaveProfile dimensionProfile = engine.getDimension().getCaveProfile();
+ CaveProfile dimensionProfile = CaveProfiles.declaredBy(engine.getDimension());
if (preferred != null && preferred.enabled()) {
return preferred;
}
@@ -1332,7 +1334,7 @@ public class ObjectPlacing {
return dimensionProfile;
}
- return new CaveProfile();
+ return DEFAULT_CAVE_PROFILE;
}
private CaveAnchorMode resolveAnchorMode(IrisObjectPlacement objectPlacement, CaveProfile caveProfile) {
diff --git a/src/main/java/art/arcane/iris/engine/modifier/CarveModule.java b/src/main/java/art/arcane/iris/engine/modifier/CarveModule.java
index d69592f3d..4d6a91412 100644
--- a/src/main/java/art/arcane/iris/engine/modifier/CarveModule.java
+++ b/src/main/java/art/arcane/iris/engine/modifier/CarveModule.java
@@ -18,7 +18,10 @@
package art.arcane.iris.engine.modifier;
-import art.arcane.iris.builtin.carve.CaveFieldModule;
+import art.arcane.iris.builtin.carve.CarvingBiomeSettings;
+import art.arcane.iris.builtin.carve.CarvingEnabledSettings;
+import art.arcane.iris.builtin.carve.CarvingSettings;
+import art.arcane.iris.builtin.carve.CaveDepthSettings;
import art.arcane.iris.builtin.carve.CaveProfile;
import com.volmit.FeatureRegistry;
import art.arcane.iris.builtin.IrisStages;
@@ -28,6 +31,7 @@ import art.arcane.iris.engine.mantle.components.CaveCarving;
import art.arcane.iris.engine.object.world.dimension.IrisDimension;
import com.volmit.IrisModule;
import com.volmit.ModuleInfo;
+import com.volmit.service.CaveBiomes;
import com.volmit.stage.ChunkStageContext;
import com.volmit.stage.MantleStageContext;
import com.volmit.stage.StageGraph;
@@ -51,8 +55,12 @@ public final class CarveModule implements IrisModule {
@Override
public void register(FeatureRegistry registry) {
- registry.registerHeldType(CaveProfile.class);
- registry.registerHeldType(CaveFieldModule.class);
+ registry.registerSettings(CaveProfile.class);
+ registry.registerSettings(CarvingSettings.class);
+ registry.registerSettings(CarvingEnabledSettings.class);
+ registry.registerSettings(CarvingBiomeSettings.class);
+ registry.registerSettings(CaveDepthSettings.class);
+ registry.registerService(CaveBiomes.class, new CaveBiomeBands());
}
@Override
@@ -83,6 +91,6 @@ public final class CarveModule implements IrisModule {
* also does: Iris then skips this stage's mantle pass like any disabled component.
*/
private static boolean carves(IrisDimension dimension) {
- return dimension.isCarvingEnabled();
+ return dimension.getModuleSettings().find(CarvingEnabledSettings.class).map(CarvingEnabledSettings::enabled).orElse(true);
}
}
diff --git a/src/main/java/art/arcane/iris/engine/modifier/CaveApplying.java b/src/main/java/art/arcane/iris/engine/modifier/CaveApplying.java
index 9ecd42df6..49b57c590 100644
--- a/src/main/java/art/arcane/iris/engine/modifier/CaveApplying.java
+++ b/src/main/java/art/arcane/iris/engine/modifier/CaveApplying.java
@@ -28,7 +28,6 @@ import art.arcane.iris.engine.decorator.IrisSurfaceDecorator;
import art.arcane.iris.engine.framework.Engine;
import art.arcane.iris.engine.object.world.biome.InferredType;
import art.arcane.iris.engine.object.world.biome.IrisBiome;
-import art.arcane.iris.engine.object.terrain.carving.IrisDimensionCarvingResolver;
import art.arcane.iris.util.project.context.ChunkContext;
import art.arcane.iris.util.common.data.B;
import art.arcane.volmlib.util.documentation.ChunkCoordinates;
@@ -88,7 +87,6 @@ public class CaveApplying {
public void apply(int x, int z, Hunk output, boolean multicore, ChunkContext context) {
PrecisionStopwatch caveStopwatch = PrecisionStopwatch.start();
Mantle mantle = engine.getMantle().getMantle();
- IrisDimensionCarvingResolver.State resolverState = new IrisDimensionCarvingResolver.State();
Long2ObjectOpenHashMap caveBiomeCache = new Long2ObjectOpenHashMap<>(2048);
IrisCarveScratch scratch = SCRATCH.get();
scratch.reset();
@@ -180,7 +178,7 @@ public class CaveApplying {
int worldZ = rz + chunkBlockZ;
String customBiome = cavern.getCustomBiome();
IrisBiome biome = customBiome.isEmpty()
- ? resolveCaveBiome(caveBiomeCache, worldX, yy, worldZ, resolverState)
+ ? resolveCaveBiome(caveBiomeCache, worldX, yy, worldZ)
: resolveCustomBiome(customBiomeCache, customBiome);
if (biome != null) {
@@ -194,14 +192,14 @@ public class CaveApplying {
});
for (int columnIndex = 0; columnIndex < 256; columnIndex++) {
- processColumnFromMask(output, mantleChunk, mantle, columnMasks[columnIndex], columnIndex, x, z, resolverState, caveBiomeCache, customBiomeCache);
+ processColumnFromMask(output, mantleChunk, mantle, columnMasks[columnIndex], columnIndex, x, z, caveBiomeCache, customBiomeCache);
}
for (int columnIndex = 0; columnIndex < 256; columnIndex++) {
if (boundaryMasks[columnIndex].isEmpty() || !columnMasks[columnIndex].isEmpty()) {
continue;
}
- processBoundaryColumnFromMask(output, boundaryMasks[columnIndex], walls, columnIndex, x, z, resolverState, caveBiomeCache, customBiomeCache);
+ processBoundaryColumnFromMask(output, boundaryMasks[columnIndex], walls, columnIndex, x, z, caveBiomeCache, customBiomeCache);
}
// Surface-break carving must not leave an ore cap suspended across the opening.
@@ -415,7 +413,6 @@ public class CaveApplying {
int columnIndex,
int chunkX,
int chunkZ,
- IrisDimensionCarvingResolver.State resolverState,
Long2ObjectOpenHashMap caveBiomeCache,
Map customBiomeCache
) {
@@ -444,7 +441,7 @@ public class CaveApplying {
zone.ceiling = buf;
} else {
if (zone.isValid(engine)) {
- processZone(output, mc, mantle, zone, rx, rz, worldX, worldZ, resolverState, caveBiomeCache, customBiomeCache);
+ processZone(output, mc, mantle, zone, rx, rz, worldX, worldZ, caveBiomeCache, customBiomeCache);
}
zone = new CaveZone();
zone.setFloor(y);
@@ -456,7 +453,7 @@ public class CaveApplying {
}
if (zone.isValid(engine)) {
- processZone(output, mc, mantle, zone, rx, rz, worldX, worldZ, resolverState, caveBiomeCache, customBiomeCache);
+ processZone(output, mc, mantle, zone, rx, rz, worldX, worldZ, caveBiomeCache, customBiomeCache);
}
}
@@ -467,7 +464,6 @@ public class CaveApplying {
int columnIndex,
int chunkX,
int chunkZ,
- IrisDimensionCarvingResolver.State resolverState,
Long2ObjectOpenHashMap caveBiomeCache,
Map customBiomeCache
) {
@@ -488,14 +484,14 @@ public class CaveApplying {
if (y == zoneCeiling + 1) {
zoneCeiling = y;
} else {
- paintBoundaryZone(output, walls, rx, rz, worldX, worldZ, zoneFloor, zoneCeiling, resolverState, caveBiomeCache, customBiomeCache);
+ paintBoundaryZone(output, walls, rx, rz, worldX, worldZ, zoneFloor, zoneCeiling, caveBiomeCache, customBiomeCache);
zoneFloor = y;
zoneCeiling = y;
}
y = boundaryMask.nextSetBit(y + 1);
}
- paintBoundaryZone(output, walls, rx, rz, worldX, worldZ, zoneFloor, zoneCeiling, resolverState, caveBiomeCache, customBiomeCache);
+ paintBoundaryZone(output, walls, rx, rz, worldX, worldZ, zoneFloor, zoneCeiling, caveBiomeCache, customBiomeCache);
}
private void paintBoundaryZone(
@@ -507,16 +503,15 @@ public class CaveApplying {
int worldZ,
int zoneFloor,
int zoneCeiling,
- IrisDimensionCarvingResolver.State resolverState,
Long2ObjectOpenHashMap caveBiomeCache,
Map customBiomeCache
) {
IrisBiome floorBiome = resolveCaveBoundaryBiome(
walls.get(rx, zoneFloor, rz), worldX, zoneFloor, worldZ,
- resolverState, caveBiomeCache, customBiomeCache);
+ caveBiomeCache, customBiomeCache);
IrisBiome ceilingBiome = resolveCaveBoundaryBiome(
walls.get(rx, zoneCeiling, rz), worldX, zoneCeiling, worldZ,
- resolverState, caveBiomeCache, customBiomeCache);
+ caveBiomeCache, customBiomeCache);
if (floorBiome == null && ceilingBiome == null) {
return;
}
@@ -580,7 +575,7 @@ public class CaveApplying {
return (h & 15L) == 0L;
}
- private void processZone(Hunk output, MantleChunk mc, Mantle mantle, CaveZone zone, int rx, int rz, int xx, int zz, IrisDimensionCarvingResolver.State resolverState, Long2ObjectOpenHashMap caveBiomeCache, Map customBiomeCache) {
+ private void processZone(Hunk output, MantleChunk mc, Mantle mantle, CaveZone zone, int rx, int rz, int xx, int zz, Long2ObjectOpenHashMap caveBiomeCache, Map customBiomeCache) {
int maxY = output.getHeight();
if (zone.ceiling + 1 < maxY && B.isDecorant(output.getRaw(rx, zone.ceiling + 1, rz))) {
@@ -602,8 +597,8 @@ public class CaveApplying {
mantle.set(xx, zone.floor, zz, MarkerMatter.CAVE_FLOOR);
}
- IrisBiome floorBiome = resolveCaveBoundaryBiome(mc, rx, zone.floor, rz, xx, zz, resolverState, caveBiomeCache, customBiomeCache);
- IrisBiome ceilingBiome = resolveCaveBoundaryBiome(mc, rx, zone.ceiling, rz, xx, zz, resolverState, caveBiomeCache, customBiomeCache);
+ IrisBiome floorBiome = resolveCaveBoundaryBiome(mc, rx, zone.floor, rz, xx, zz, caveBiomeCache, customBiomeCache);
+ IrisBiome ceilingBiome = resolveCaveBoundaryBiome(mc, rx, zone.ceiling, rz, xx, zz, caveBiomeCache, customBiomeCache);
if (floorBiome == null && ceilingBiome == null) {
return;
}
@@ -657,10 +652,10 @@ public class CaveApplying {
}
}
- IrisBiome resolveCaveBoundaryBiome(MantleChunk mantleChunk, int x, int y, int z, int worldX, int worldZ, IrisDimensionCarvingResolver.State resolverState, Long2ObjectOpenHashMap caveBiomeCache, Map customBiomeCache) {
+ IrisBiome resolveCaveBoundaryBiome(MantleChunk mantleChunk, int x, int y, int z, int worldX, int worldZ, Long2ObjectOpenHashMap caveBiomeCache, Map customBiomeCache) {
MatterCavern cavern = dataIfPresent(mantleChunk, x, y, z, MatterCavern.class);
return resolveCaveBoundaryBiome(
- cavern, worldX, y, worldZ, resolverState, caveBiomeCache, customBiomeCache);
+ cavern, worldX, y, worldZ, caveBiomeCache, customBiomeCache);
}
private static T dataIfPresent(MantleChunk mantleChunk, int x, int y, int z, Class type) {
@@ -675,11 +670,11 @@ public class CaveApplying {
return matter.getSlice(type).get(x & 15, y & 15, z & 15);
}
- IrisBiome resolveCaveBoundaryBiome(MatterCavern cavern, int worldX, int y, int worldZ, IrisDimensionCarvingResolver.State resolverState, Long2ObjectOpenHashMap caveBiomeCache, Map customBiomeCache) {
+ IrisBiome resolveCaveBoundaryBiome(MatterCavern cavern, int worldX, int y, int worldZ, Long2ObjectOpenHashMap caveBiomeCache, Map customBiomeCache) {
if (cavern != null && !cavern.getCustomBiome().isEmpty()) {
return resolveCustomBiome(customBiomeCache, cavern.getCustomBiome());
}
- return resolveCaveBiome(caveBiomeCache, worldX, y, worldZ, resolverState);
+ return resolveCaveBiome(caveBiomeCache, worldX, y, worldZ);
}
static boolean canReplaceCaveFloorLayer(Hunk output, int x, int y, int z, PlatformBlockState layer) {
@@ -701,16 +696,16 @@ public class CaveApplying {
return state != null && state.hasGravity();
}
- private IrisBiome resolveCaveBiome(Long2ObjectOpenHashMap caveBiomeCache, int x, int y, int z, IrisDimensionCarvingResolver.State resolverState) {
- IrisBiome center = sampleCaveBiome(caveBiomeCache, x, y, z, resolverState);
+ private IrisBiome resolveCaveBiome(Long2ObjectOpenHashMap caveBiomeCache, int x, int y, int z) {
+ IrisBiome center = sampleCaveBiome(caveBiomeCache, x, y, z);
if (center == null) {
return null;
}
- IrisBiome xPos = sampleCaveBiome(caveBiomeCache, x + CAVE_BIOME_BLEND_RADIUS, y, z, resolverState);
- IrisBiome xNeg = sampleCaveBiome(caveBiomeCache, x - CAVE_BIOME_BLEND_RADIUS, y, z, resolverState);
- IrisBiome zPos = sampleCaveBiome(caveBiomeCache, x, y, z + CAVE_BIOME_BLEND_RADIUS, resolverState);
- IrisBiome zNeg = sampleCaveBiome(caveBiomeCache, x, y, z - CAVE_BIOME_BLEND_RADIUS, resolverState);
+ IrisBiome xPos = sampleCaveBiome(caveBiomeCache, x + CAVE_BIOME_BLEND_RADIUS, y, z);
+ IrisBiome xNeg = sampleCaveBiome(caveBiomeCache, x - CAVE_BIOME_BLEND_RADIUS, y, z);
+ IrisBiome zPos = sampleCaveBiome(caveBiomeCache, x, y, z + CAVE_BIOME_BLEND_RADIUS);
+ IrisBiome zNeg = sampleCaveBiome(caveBiomeCache, x, y, z - CAVE_BIOME_BLEND_RADIUS);
if (xPos == center && xNeg == center && zPos == center && zNeg == center) {
return center;
@@ -733,14 +728,14 @@ public class CaveApplying {
return zNeg != null ? zNeg : center;
}
- private IrisBiome sampleCaveBiome(Long2ObjectOpenHashMap caveBiomeCache, int x, int y, int z, IrisDimensionCarvingResolver.State resolverState) {
+ private IrisBiome sampleCaveBiome(Long2ObjectOpenHashMap caveBiomeCache, int x, int y, int z) {
long key = BlockPosition.toLong(x, y, z);
IrisBiome cachedBiome = caveBiomeCache.get(key);
if (cachedBiome != null) {
return cachedBiome;
}
- IrisBiome resolvedBiome = engine.getCaveBiome(x, y, z, resolverState);
+ IrisBiome resolvedBiome = engine.getCaveBiome(x, y, z);
if (resolvedBiome != null) {
caveBiomeCache.put(key, resolvedBiome);
}
diff --git a/src/main/java/art/arcane/iris/engine/modifier/CaveBiomeBands.java b/src/main/java/art/arcane/iris/engine/modifier/CaveBiomeBands.java
new file mode 100644
index 000000000..4a67e77c3
--- /dev/null
+++ b/src/main/java/art/arcane/iris/engine/modifier/CaveBiomeBands.java
@@ -0,0 +1,61 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.engine.modifier;
+
+import art.arcane.iris.builtin.carve.CaveDepthSettings;
+import art.arcane.iris.core.modules.IrisPackWorld;
+import art.arcane.iris.engine.framework.Engine;
+import art.arcane.iris.engine.object.terrain.carving.CarvingResolver;
+import art.arcane.iris.engine.object.terrain.carving.ResolvedCarvingEntry;
+import art.arcane.iris.engine.object.world.biome.IrisBiome;
+import com.volmit.service.CaveBiomes;
+import com.volmit.world.PackWorld;
+
+import java.util.Optional;
+
+/**
+ * What the carve module tells the host about cave biomes ({@link CaveBiomes}): the biome of the dimension's carving band at a
+ * position, and how far below the surface a biome's caves begin.
+ */
+public final class CaveBiomeBands implements CaveBiomes {
+ @Override
+ public Optional overriddenBiome(PackWorld world, int x, int y, int z) {
+ Engine engine = IrisPackWorld.of(world).engine();
+ ResolvedCarvingEntry rootEntry = CarvingResolver.resolveRootEntry(engine, y + engine.getWorld().minHeight(), null);
+ if (rootEntry == null) {
+ return Optional.empty();
+ }
+ ResolvedCarvingEntry entry = CarvingResolver.resolveFromRoot(engine, rootEntry, x, z, null);
+ if (CarvingResolver.resolveEntryBiome(engine, entry, null) == null) {
+ return Optional.empty();
+ }
+ return Optional.of(entry.biomeKey().trim());
+ }
+
+ @Override
+ public int minDepthBelowSurface(PackWorld world, String biomeKey) {
+ IrisBiome biome = IrisPackWorld.of(world).engine().getData().getBiomeLoader().load(biomeKey);
+ return biome == null ? 0 : minDepthBelowSurface(biome);
+ }
+
+ /** How many blocks below the surface {@code biome}'s caves begin, as its {@code caveMinDepthBelowSurface} says; 0 where it says none. */
+ public static int minDepthBelowSurface(IrisBiome biome) {
+ return biome.getModuleSettings().find(CaveDepthSettings.class).map(CaveDepthSettings::depth).orElse(0);
+ }
+}
diff --git a/src/main/java/art/arcane/iris/engine/modifier/DepositModule.java b/src/main/java/art/arcane/iris/engine/modifier/DepositModule.java
index f2889714b..668755e37 100644
--- a/src/main/java/art/arcane/iris/engine/modifier/DepositModule.java
+++ b/src/main/java/art/arcane/iris/engine/modifier/DepositModule.java
@@ -21,7 +21,11 @@ package art.arcane.iris.engine.modifier;
import art.arcane.iris.builtin.IrisStages;
import art.arcane.iris.builtin.deposit.DepositGenerator;
import art.arcane.iris.builtin.deposit.DepositSettings;
+import art.arcane.iris.builtin.deposit.DepositVariantSettings;
+import art.arcane.iris.builtin.deposit.OreFrequencySettings;
+import art.arcane.iris.builtin.deposit.OreSizeSettings;
import art.arcane.iris.core.modules.IrisChunk;
+import com.volmit.FeatureRegistry;
import com.volmit.IrisModule;
import com.volmit.ModuleInfo;
import com.volmit.config.FeatureSettings;
@@ -48,6 +52,13 @@ public final class DepositModule implements IrisModule {
return ModuleInfo.of("iris:deposit", "Deposits", VERSION);
}
+ @Override
+ public void register(FeatureRegistry registry) {
+ registry.registerSettings(DepositVariantSettings.class);
+ registry.registerSettings(OreFrequencySettings.class);
+ registry.registerSettings(OreSizeSettings.class);
+ }
+
@Override
public void install(StageGraph graph) {
graph.define(IrisStages.Deposit.ORES)
diff --git a/src/main/java/art/arcane/iris/engine/modifier/DepositPlacer.java b/src/main/java/art/arcane/iris/engine/modifier/DepositPlacer.java
index ff3844442..a6fa011ca 100644
--- a/src/main/java/art/arcane/iris/engine/modifier/DepositPlacer.java
+++ b/src/main/java/art/arcane/iris/engine/modifier/DepositPlacer.java
@@ -21,12 +21,15 @@ package art.arcane.iris.engine.modifier;
import art.arcane.iris.builtin.deposit.DepositGenerator;
import art.arcane.iris.builtin.deposit.DepositHeightDistribution;
import art.arcane.iris.builtin.deposit.DepositPlacementScope;
+import art.arcane.iris.builtin.deposit.DepositVariant;
+import art.arcane.iris.builtin.deposit.DepositVariantSettings;
+import art.arcane.iris.builtin.deposit.OreFrequencySettings;
+import art.arcane.iris.builtin.deposit.OreSizeSettings;
+import art.arcane.iris.core.loader.IrisRegistrant;
import art.arcane.iris.engine.framework.Engine;
import art.arcane.iris.engine.framework.EngineAssignedComponent;
import art.arcane.iris.engine.object.world.biome.IrisBiome;
-import art.arcane.iris.engine.object.terrain.deposit.IrisDepositVariant;
import art.arcane.iris.engine.object.world.dimension.IrisDimension;
-import art.arcane.iris.engine.object.terrain.carving.IrisDimensionCarvingResolver;
import art.arcane.iris.engine.object.prefab.IrisObject;
import art.arcane.iris.engine.object.procedural.IrisProceduralBlocks;
import art.arcane.iris.engine.object.world.region.IrisRegion;
@@ -52,7 +55,10 @@ import java.util.concurrent.ConcurrentHashMap;
*/
public class DepositPlacer extends EngineAssignedComponent {
private final RNG rng;
+ private static final double UNCHANGED_ORE_MULTIPLIER = 1D;
+
private final Map resolved = new ConcurrentHashMap<>();
+ private final Map variants = new ConcurrentHashMap<>();
public DepositPlacer(Engine engine) {
super(engine, "Deposit");
@@ -95,7 +101,6 @@ public class DepositPlacer extends EngineAssignedComponent {
}
public void generate(DepositGenerator k, MantleChunk chunk, Hunk data, RNG rng, int cx, int cz, boolean safe, HeightMap he, ChunkContext context) {
- IrisDimensionCarvingResolver.State carvingState = new IrisDimensionCarvingResolver.State();
ResolvedDeposit deposit = resolved(k);
if (k.spawnChance() < rng.d())
return;
@@ -141,8 +146,7 @@ public class DepositPlacer extends EngineAssignedComponent {
boolean oreDeposit = deposit.isOre();
IrisBiome surfaceBiome = context.getBiome().get(x, z);
IrisBiome depositBiome = oreDeposit || k.usesCaveBiomeFilter()
- ? getEngine().getCaveBiome(
- (cx << 4) + x, biomeY, (cz << 4) + z, carvingState)
+ ? getEngine().getCaveBiome((cx << 4) + x, biomeY, (cz << 4) + z)
: null;
if (!deposit.matchesBiome(surfaceBiome, depositBiome)) {
continue;
@@ -150,13 +154,13 @@ public class DepositPlacer extends EngineAssignedComponent {
if (oreDeposit) {
if (depositBiome != null) {
- double frequencyMultiplier = depositBiome.getOreDepositFrequencyMultiplier();
+ double frequencyMultiplier = oreFrequencyMultiplier(depositBiome);
if (frequencyMultiplier < 1D
&& !passesOreFrequency(frequencyMultiplier, rng.d())) {
continue;
}
- double sizeMultiplier = depositBiome.getOreDepositSizeMultiplier();
+ double sizeMultiplier = oreSizeMultiplier(depositBiome);
if (sizeMultiplier != 1D) {
IrisObject scaledClump = deposit.clump(rng, sizeMultiplier);
int scaledDimension = scaledClump.getW();
@@ -204,7 +208,7 @@ public class DepositPlacer extends EngineAssignedComponent {
if (chunk.get(nx, ny, nz, MatterCavern.class) == null) {
PlatformBlockState ore = clump.getBlocks().get(j);
PlatformBlockState remapped = resolveDepositVariant(
- cx, cz, nx, ny, nz, ore, dimension, context, carvingState);
+ cx, cz, nx, ny, nz, ore, dimension, context);
PlatformBlockState finalBlock = remapped != null
? remapped
: B.toDeepSlateOre(current, ore);
@@ -310,14 +314,14 @@ public class DepositPlacer extends EngineAssignedComponent {
return Math.max(minimum, Math.min(center, maximum));
}
- private PlatformBlockState resolveDepositVariant(int cx, int cz, int nx, int localY, int nz, PlatformBlockState ore, IrisDimension dimension, ChunkContext context, IrisDimensionCarvingResolver.State carvingState) {
+ private PlatformBlockState resolveDepositVariant(int cx, int cz, int nx, int localY, int nz, PlatformBlockState ore, IrisDimension dimension, ChunkContext context) {
int worldX = (cx << 4) + nx;
int worldZ = (cz << 4) + nz;
int worldY = absoluteWorldY(getEngine().getMinHeight(), localY);
- IrisBiome biome = getEngine().getCaveBiome(worldX, localY, worldZ, carvingState);
+ IrisBiome biome = getEngine().getCaveBiome(worldX, localY, worldZ);
if (biome != null) {
- PlatformBlockState match = matchDepositVariant(biome.getDepositVariants(), ore, worldY);
+ PlatformBlockState match = matchDepositVariant(biome, ore, worldY);
if (match != null) {
return match;
}
@@ -325,14 +329,14 @@ public class DepositPlacer extends EngineAssignedComponent {
IrisRegion region = context.getRegion().get(nx, nz);
if (region != null) {
- PlatformBlockState match = matchDepositVariant(region.getDepositVariants(), ore, worldY);
+ PlatformBlockState match = matchDepositVariant(region, ore, worldY);
if (match != null) {
return match;
}
}
if (dimension != null) {
- PlatformBlockState match = matchDepositVariant(dimension.getDepositVariants(), ore, worldY);
+ PlatformBlockState match = matchDepositVariant(dimension, ore, worldY);
if (match != null) {
return match;
}
@@ -341,17 +345,14 @@ public class DepositPlacer extends EngineAssignedComponent {
return null;
}
- private PlatformBlockState matchDepositVariant(java.util.List variants, PlatformBlockState ore, int y) {
- if (variants == null || variants.isEmpty()) {
- return null;
- }
-
- for (IrisDepositVariant variant : variants) {
- if (y < variant.getMinHeight() || y > variant.getMaxHeight()) {
+ private PlatformBlockState matchDepositVariant(IrisRegistrant owner, PlatformBlockState ore, int y) {
+ for (DepositVariant declared : variantsOf(owner)) {
+ ResolvedDepositVariant variant = variants.computeIfAbsent(declared, ResolvedDepositVariant::new);
+ if (!variant.appliesAt(y)) {
continue;
}
- PlatformBlockState swapped = variant.remapOrNull(ore, getData());
+ PlatformBlockState swapped = variant.remapOrNull(ore);
if (swapped != null) {
return swapped;
}
@@ -359,4 +360,16 @@ public class DepositPlacer extends EngineAssignedComponent {
return null;
}
+
+ private static List variantsOf(IrisRegistrant owner) {
+ return owner.getModuleSettings().find(DepositVariantSettings.class).map(DepositVariantSettings::variants).orElse(List.of());
+ }
+
+ private static double oreFrequencyMultiplier(IrisBiome biome) {
+ return biome.getModuleSettings().find(OreFrequencySettings.class).map(OreFrequencySettings::multiplier).orElse(UNCHANGED_ORE_MULTIPLIER);
+ }
+
+ private static double oreSizeMultiplier(IrisBiome biome) {
+ return biome.getModuleSettings().find(OreSizeSettings.class).map(OreSizeSettings::multiplier).orElse(UNCHANGED_ORE_MULTIPLIER);
+ }
}
diff --git a/src/main/java/art/arcane/iris/engine/modifier/FloatingIslands.java b/src/main/java/art/arcane/iris/engine/modifier/FloatingIslands.java
index 90f51a6e0..7ef4161f9 100644
--- a/src/main/java/art/arcane/iris/engine/modifier/FloatingIslands.java
+++ b/src/main/java/art/arcane/iris/engine/modifier/FloatingIslands.java
@@ -19,6 +19,7 @@
package art.arcane.iris.engine.modifier;
+import art.arcane.iris.engine.object.terrain.floating.FloatingChildren;
import art.arcane.iris.engine.object.terrain.floating.ResolvedFloatingChild;
import art.arcane.iris.builtin.floating.FloatingBottomPaletteMode;
import art.arcane.iris.builtin.prepare.SlopeClip;
@@ -229,7 +230,7 @@ public class FloatingIslands {
int wx = x + xf;
int wz = z + zf;
IrisBiome parent = boundarySampler.parent(wx, wz);
- if (parent == null || parent.getFloatingChildBiomes() == null || parent.getFloatingChildBiomes().isEmpty()) {
+ if (parent == null || FloatingChildren.declaredBy(parent).isEmpty()) {
continue;
}
FloatingIslandSample sample = FloatingIslandSample.sampleMemoized(parent, wx, wz, chunkHeight, baseSeed, data, engine, boundarySampler);
@@ -314,7 +315,7 @@ public class FloatingIslands {
int wx = x + xf;
int wz = z + zf;
IrisBiome parent = boundarySampler.parent(wx, wz);
- if (parent == null || parent.getFloatingChildBiomes() == null || parent.getFloatingChildBiomes().isEmpty()) {
+ if (parent == null || FloatingChildren.declaredBy(parent).isEmpty()) {
continue;
}
FloatingIslandSample sample = FloatingIslandSample.sampleMemoized(parent, wx, wz, chunkHeight, baseSeed, data, engine, boundarySampler);
diff --git a/src/main/java/art/arcane/iris/engine/modifier/FloatingModule.java b/src/main/java/art/arcane/iris/engine/modifier/FloatingModule.java
index 691d6ba22..f116a6cdc 100644
--- a/src/main/java/art/arcane/iris/engine/modifier/FloatingModule.java
+++ b/src/main/java/art/arcane/iris/engine/modifier/FloatingModule.java
@@ -18,7 +18,8 @@
package art.arcane.iris.engine.modifier;
-import art.arcane.iris.builtin.floating.FloatingChildBiome;
+import art.arcane.iris.builtin.floating.FloatingChildSettings;
+import art.arcane.iris.builtin.floating.MergeFloatingChildrenSettings;
import com.volmit.FeatureRegistry;
import art.arcane.iris.builtin.IrisStages;
import art.arcane.iris.core.modules.IrisChunk;
@@ -50,7 +51,8 @@ public final class FloatingModule implements IrisModule {
@Override
public void register(FeatureRegistry registry) {
- registry.registerHeldType(FloatingChildBiome.class);
+ registry.registerSettings(FloatingChildSettings.class);
+ registry.registerSettings(MergeFloatingChildrenSettings.class);
}
@Override
diff --git a/src/main/java/art/arcane/iris/engine/modifier/PerfectionModule.java b/src/main/java/art/arcane/iris/engine/modifier/PerfectionModule.java
index 6e45f193f..cc98dc82c 100644
--- a/src/main/java/art/arcane/iris/engine/modifier/PerfectionModule.java
+++ b/src/main/java/art/arcane/iris/engine/modifier/PerfectionModule.java
@@ -20,6 +20,7 @@ package art.arcane.iris.engine.modifier;
import art.arcane.iris.builtin.IrisStages;
import art.arcane.iris.core.modules.IrisChunk;
+import art.arcane.iris.engine.actuator.HiddenOres;
import art.arcane.iris.engine.framework.Engine;
import art.arcane.iris.engine.object.procedural.IrisProceduralBlocks;
import art.arcane.iris.engine.object.world.dimension.IrisDimension;
@@ -68,7 +69,7 @@ public final class PerfectionModule implements IrisModule {
IrisDimension dimension = engine.getDimension();
PrecisionStopwatch stopwatch = PrecisionStopwatch.start();
Hunk blocks = chunk.blocks();
- if (dimension.isHideOresForHiddenOre()) {
+ if (HiddenOres.in(dimension)) {
hideOres(blocks);
}
boolean removed;
diff --git a/src/main/java/art/arcane/iris/engine/modifier/ResolvedDepositVariant.java b/src/main/java/art/arcane/iris/engine/modifier/ResolvedDepositVariant.java
new file mode 100644
index 000000000..b1a6dce34
--- /dev/null
+++ b/src/main/java/art/arcane/iris/engine/modifier/ResolvedDepositVariant.java
@@ -0,0 +1,66 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.engine.modifier;
+
+import art.arcane.iris.builtin.deposit.DepositVariant;
+import art.arcane.iris.engine.data.cache.AtomicCache;
+import art.arcane.iris.engine.object.procedural.IrisProceduralBlocks;
+import art.arcane.iris.spi.PlatformBlockState;
+import art.arcane.iris.util.common.data.B;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * One {@link DepositVariant} made ready: its source and replacement block ids resolved to the platform's blocks, built once on
+ * first use. A rule whose source or replacement the platform does not know remaps nothing.
+ */
+final class ResolvedDepositVariant {
+ private final DepositVariant settings;
+ private final AtomicCache