Ores, hideOresForHiddenOre, deposit variants and the ore deposit multipliers are settings of iris:terrain and iris:deposit

OreSettings (ores), HideOresSettings (hideOresForHiddenOre), DepositVariantSettings (depositVariants),
OreFrequencySettings and OreSizeSettings are IrisApi-typed features under the keys packs always wrote.
ResolvedOre/ResolvedOres/TerrainOres keep the resolved blocks and the chance noise per world, warmed in
the same order and with the same seeds as before; ResolvedDepositVariant resolves the remaps. IrisBiome,
IrisRegion and IrisDimension lose the fields and their caches; IrisOreGenerator, IrisBiomeOres,
IrisOreGeneratorBounds and IrisDepositVariant are deleted. Inferred biome variants keep the module
settings of the biome they are copied from.
This commit is contained in:
piexel committed 2026-10-10 08:27:45 +02:00
1 parent dcf5cc045a
commit 6617cc3957
24 files changed
+884 -691

No files matched your search

@@ -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 <https://www.gnu.org/licenses/>.
*/
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<String, String> remap = Map.of();
public DepositVariant() {
}
public int minHeight() {
return minHeight;
}
public int maxHeight() {
return maxHeight;
}
public Map<String, String> remap() {
return remap == null ? Map.of() : Collections.unmodifiableMap(remap);
}
}
@@ -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 <https://www.gnu.org/licenses/>.
*/
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<DepositVariant> variants = List.of();
public DepositVariantSettings() {
}
public DepositVariantSettings(List<DepositVariant> variants) {
this.variants = List.copyOf(variants);
}
public List<DepositVariant> variants() {
return variants == null ? List.of() : Collections.unmodifiableList(variants);
}
}
@@ -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 <https://www.gnu.org/licenses/>.
*/
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;
}
}
@@ -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 <https://www.gnu.org/licenses/>.
*/
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;
}
}