mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-29 09:15:27 +00:00
Merge branch 'wave3/c'
# Conflicts: # README.md # src/main/java/art/arcane/iris/engine/actuator/TerrainModule.java # src/main/java/art/arcane/iris/engine/mantle/components/CaveCarving.java # src/main/java/art/arcane/iris/engine/object/world/biome/IrisBiome.java # src/main/java/art/arcane/iris/engine/object/world/dimension/IrisDimension.java
This commit is contained in:
commit
9b5ced0cc8
50 files changed
+1807
-1047
No files matched your search
@@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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<String> treeBiomes() {
|
||||
return Set.of(biome());
|
||||
}
|
||||
}
|
||||
@@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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<String> 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<String> children() {
|
||||
return children == null ? List.of() : Collections.unmodifiableList(children);
|
||||
}
|
||||
|
||||
public int childRecursionDepth() {
|
||||
return childRecursionDepth;
|
||||
}
|
||||
}
|
||||
@@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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<CarvingEntry> entries = List.of();
|
||||
|
||||
public CarvingSettings() {
|
||||
}
|
||||
|
||||
public CarvingSettings(List<CarvingEntry> entries) {
|
||||
this.entries = List.copyOf(entries);
|
||||
}
|
||||
|
||||
public List<CarvingEntry> 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<String> usedBiomes(Collection<IrisFeature> dimension) {
|
||||
Set<String> biomes = new LinkedHashSet<>();
|
||||
for (CarvingEntry entry : entries()) {
|
||||
if (entry != null && entry.enabled()) {
|
||||
biomes.add(entry.biome());
|
||||
}
|
||||
}
|
||||
return biomes;
|
||||
}
|
||||
}
|
||||
@@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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<FloatingChildBiome> children = List.of();
|
||||
|
||||
public FloatingChildSettings() {
|
||||
}
|
||||
|
||||
public FloatingChildSettings(List<FloatingChildBiome> children) {
|
||||
this.children = List.copyOf(children);
|
||||
}
|
||||
|
||||
public List<FloatingChildBiome> children() {
|
||||
return children == null ? List.of() : Collections.unmodifiableList(children);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> usedBiomes(Collection<IrisFeature> dimension) {
|
||||
CarvingSettings carving = dimension.stream().filter(CarvingSettings.class::isInstance).map(CarvingSettings.class::cast).findFirst().orElse(null);
|
||||
Set<String> 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;
|
||||
}
|
||||
}
|
||||
@@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -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.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<OreGenerator> generators = List.of();
|
||||
|
||||
public OreSettings() {
|
||||
}
|
||||
|
||||
public OreSettings(List<OreGenerator> generators) {
|
||||
this.generators = List.copyOf(generators);
|
||||
}
|
||||
|
||||
public List<OreGenerator> generators() {
|
||||
return generators == null ? List.of() : Collections.unmodifiableList(generators);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user