Procedural object settings as module-owned IrisApi types: coral, crystal, formation, fungus, ruin and the tree profile classes; ResolvedProceduralPlacement bakes and places them

This commit is contained in:
piexel committed 2026-10-09 22:31:08 +02:00
1 parent feaa1e88c4
commit 1f3e1c9aba
62 files changed
+2309 -1003

No files matched your search

@@ -0,0 +1,344 @@
/*
* 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.objects.coral;
import art.arcane.iris.builtin.anchor.ObjectPlaceMode;
import art.arcane.iris.builtin.carve.CarvingMode;
import art.arcane.iris.builtin.prepare.ObjectRotation;
import art.arcane.iris.builtin.prepare.ObjectTranslate;
import art.arcane.iris.builtin.stilt.StiltSettings;
import art.arcane.iris.builtin.vacuum.VacuumSettings;
import art.arcane.iris.builtin.validate.ObjectLimit;
import com.volmit.block.PaletteSpec;
import com.volmit.config.Desc;
import com.volmit.config.Snippet;
import com.volmit.config.MaxNumber;
import com.volmit.config.MinNumber;
import com.volmit.config.Ref;
import com.volmit.config.Reference;
import com.volmit.config.Required;
import java.util.Optional;
@Snippet("coral")
@Desc("A single procedurally generated coral reef structure. Iris bakes a pool of deterministic variants from these settings and scatters them across the seafloor at world-gen time, exactly like an object placement but generated from scratch instead of loaded from an iob file. Mirrors the procedural tree system but tuned for underwater reefs: structural blocks are waterlogged so the coral stays alive, and placement defaults to anchoring on the terrain beneath the water surface.")
public final class Coral {
@Desc("A human readable name used in logs and as the variant load key.")
private String name = "coral";
@MinNumber(0)
@MaxNumber(1)
@Desc("The chance per chunk for this coral to attempt placement. Use density for multiple per chunk.")
private double chance = 0.4;
@MinNumber(1)
@Desc("If the chance check passes, attempt this many placements in the chunk.")
private int density = 1;
@MinNumber(1)
@MaxNumber(64)
@Desc("How many distinct variants to pre-bake for this coral. Higher means more variety at a small memory cost.")
private int variants = 6;
@Desc("The base seed for deterministic generation. The same seed and settings always bake the same variants.")
private long seed = 1337;
@Desc("The placement mode used to anchor the coral to the seafloor.")
private ObjectPlaceMode mode = ObjectPlaceMode.CENTER_HEIGHT;
@Desc("Rotate this coral's placement.")
private ObjectRotation rotation = new ObjectRotation();
@Desc("Limit the max or min height of placement.")
private ObjectLimit clamp = new ObjectLimit();
@Desc("Whether this coral may place on the terrain surface, under carvings, or both.")
private CarvingMode carvingSupport = CarvingMode.SURFACE_ONLY;
@Desc("If true (default for coral), the coral anchors on the terrain height beneath the water, so it grows up from the seafloor rather than floating at the water surface.")
private boolean underwater = true;
@Desc("Translate (offset) this placement along each axis; for example set a negative y to sink it into the seafloor.")
private ObjectTranslate translate = new ObjectTranslate();
@Desc("Settings for the stilt place modes (STILT, MIN_STILT, FAST_STILT, CENTER_STILT, ERODE_STILT, ORGANIC_STILT).")
private StiltSettings stiltSettings;
@Desc("Settings for the vacuum place modes (VACUUM, VACUUM_HIGH, VACUUM_FAST, VACUUM_ORGANIC).")
private VacuumSettings vacuumSettings;
@Desc("If true (default), every resolved coral block that is waterloggable is forced waterlogged so the coral does not die in water (coral fans, sea pickles and kelp also waterlog). Set false to place dead/dry coral.")
private boolean waterlogged = true;
@Desc("The overall silhouette this coral grows into (branching, fan, brain, pillar, tendril). Each form runs a different generation routine.")
private CoralForm form = CoralForm.BRANCHING;
@Required
@Desc("The structural coral block (the living wood of the reef), e.g. minecraft:tube_coral_block. Ignored when blockPalette is set.")
@Ref(Reference.BLOCK)
private String block = "minecraft:tube_coral_block";
@Desc("A noise-driven palette for the structural coral block. When set this overrides the single block, letting the reef mix tube/brain/bubble/fire/horn coral_block tones across its body.")
private PaletteSpec blockPalette;
@Desc("Optional tip block placed at branch tips and at the very top of the structure, e.g. coral fans or minecraft:sea_pickle. Ignored when tipPalette is set. Null disables tips.")
@Ref(Reference.BLOCK)
private String tipBlock = null;
@Desc("A noise-driven palette for the tip block. When set this overrides the single tipBlock, letting tips mix fan / pickle decorations.")
private PaletteSpec tipPalette;
@MinNumber(0)
@MaxNumber(1)
@Desc("The chance per eligible tip position to place a tip block (coral fan / sea pickle).")
private double tipChance = 0.6;
@MinNumber(1)
@Desc("Minimum overall height of the coral in blocks.")
private int heightMin = 4;
@MinNumber(1)
@Desc("Maximum overall height of the coral in blocks.")
private int heightMax = 8;
@MinNumber(0)
@Desc("Horizontal spread of the structure in blocks. For BRANCHING this is how far arms reach out, for BRAIN/PILLAR/FAN it widens the base footprint.")
private double spread = 3;
@MinNumber(0)
@MaxNumber(1)
@Desc("Lateral noise wobble (0-1) applied to branches and tendrils so they are not ruler-straight. 0 is perfectly straight, 1 is heavily wandering.")
private double sway = 0.5;
@MinNumber(1)
@MaxNumber(12)
@Desc("BRANCHING only: how many arms sprout from the central stalk.")
private int branchCount = 4;
@MinNumber(1)
@Desc("BRANCHING only: the length of each arm in blocks before reaching its tip.")
private double branchLength = 3;
@MinNumber(0)
@MaxNumber(90)
@Desc("BRANCHING only: the upward elevation in degrees of each arm from horizontal. 90 is straight up, 0 is flat out.")
private double branchElevation = 55;
@Desc("BRANCHING only: how the arms are distributed around the stalk by azimuth.")
private CoralBranchAzimuth branchAzimuth = CoralBranchAzimuth.GOLDEN_ANGLE;
@Desc("BRANCHING only: if true, each arm splits once into a small fan of sub-arms for a bushier reef.")
private boolean subBranches = true;
@MinNumber(1)
@MaxNumber(5)
@Desc("BRANCHING only: how many sub-arms each arm splits into when subBranches is true.")
private int subBranchCount = 2;
@MinNumber(0)
@MaxNumber(1)
@Desc("BRANCHING only: the length of each sub-arm as a fraction of its parent arm.")
private double subBranchScale = 0.5;
@MinNumber(0)
@MaxNumber(4)
@Desc("BRANCHING and PILLAR only: the radius of the small coral tip cluster grown at each tip.")
private int tipClusterRadius = 1;
@MinNumber(1)
@MaxNumber(8)
@Desc("BRAIN only: the horizontal radius of the brain-coral blob in blocks.")
private int brainRadius = 3;
@MinNumber(0)
@MaxNumber(1)
@Desc("BRAIN only: how strongly 3D value noise perturbs the ellipsoid surface, for a wrinkled organic blob. 0 is a smooth dome.")
private double brainRoughness = 0.35;
@MinNumber(1)
@MaxNumber(12)
@Desc("PILLAR only: the radius of the stout vertical column in blocks.")
private int pillarRadius = 1;
@MinNumber(1)
@MaxNumber(8)
@Desc("FAN only: the half-width of the upright fan plane in blocks (the disc widens toward its mid-height).")
private int fanWidth = 3;
@MinNumber(1)
@MaxNumber(12)
@Desc("TENDRIL only: how many thin wavy stalks rise from the base.")
private int tendrilCount = 4;
public Coral() {
}
public String name() {
return name;
}
public double chance() {
return chance;
}
public int density() {
return density;
}
public int variants() {
return variants;
}
public long seed() {
return seed;
}
public ObjectPlaceMode mode() {
return mode == null ? ObjectPlaceMode.CENTER_HEIGHT : mode;
}
public ObjectRotation rotation() {
return rotation;
}
public ObjectLimit clamp() {
return clamp;
}
public CarvingMode carvingSupport() {
return carvingSupport == null ? CarvingMode.SURFACE_ONLY : carvingSupport;
}
public boolean underwater() {
return underwater;
}
public ObjectTranslate translate() {
return translate;
}
/** Empty where the pack sets none. */
public Optional<StiltSettings> stiltSettings() {
return Optional.ofNullable(stiltSettings);
}
/** Empty where the pack sets none. */
public Optional<VacuumSettings> vacuumSettings() {
return Optional.ofNullable(vacuumSettings);
}
public boolean waterlogged() {
return waterlogged;
}
public CoralForm form() {
return form == null ? CoralForm.BRANCHING : form;
}
public String block() {
return block;
}
/** Empty where the pack sets none. */
public Optional<PaletteSpec> blockPalette() {
return Optional.ofNullable(blockPalette);
}
/** Empty where the pack sets none. */
public Optional<String> tipBlock() {
return Optional.ofNullable(tipBlock);
}
/** Empty where the pack sets none. */
public Optional<PaletteSpec> tipPalette() {
return Optional.ofNullable(tipPalette);
}
public double tipChance() {
return tipChance;
}
public int heightMin() {
return heightMin;
}
public int heightMax() {
return heightMax;
}
public double spread() {
return spread;
}
public double sway() {
return sway;
}
public int branchCount() {
return branchCount;
}
public double branchLength() {
return branchLength;
}
public double branchElevation() {
return branchElevation;
}
public CoralBranchAzimuth branchAzimuth() {
return branchAzimuth == null ? CoralBranchAzimuth.GOLDEN_ANGLE : branchAzimuth;
}
public boolean subBranches() {
return subBranches;
}
public int subBranchCount() {
return subBranchCount;
}
public double subBranchScale() {
return subBranchScale;
}
public int tipClusterRadius() {
return tipClusterRadius;
}
public int brainRadius() {
return brainRadius;
}
public double brainRoughness() {
return brainRoughness;
}
public int pillarRadius() {
return pillarRadius;
}
public int fanWidth() {
return fanWidth;
}
public int tendrilCount() {
return tendrilCount;
}
}
@@ -0,0 +1,33 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2022 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.objects.coral;
import com.volmit.config.Desc;
@Desc("How the arms of a BRANCHING coral are distributed around the central stalk by compass azimuth.")
public enum CoralBranchAzimuth {
@Desc("Distribute arms by the golden angle (about 137.5 degrees per arm) for a natural phyllotactic spiral where no two arms overlap.")
GOLDEN_ANGLE,
@Desc("Distribute arms in evenly spaced spokes, dividing 360 degrees equally between them like a radial whorl.")
EVEN,
@Desc("Place each arm at a fully random azimuth using the deterministic per-variant RNG, for an irregular wild reef.")
RANDOM
}
@@ -0,0 +1,39 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2022 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.objects.coral;
import com.volmit.config.Desc;
@Desc("The overall silhouette a procedural coral grows into. Each form drives a completely different generation routine in the coral generator, from tree-like branching arms to rounded brain blobs and thin wavy tendrils.")
public enum CoralForm {
@Desc("A tree-like coral built from a stout central stalk that sprouts several upward-leaning arms (distributed by golden angle or randomly), each optionally splitting once into sub-arms, with small coral tip clusters (fans / sea pickles) at the ends. The most structurally complex form and the closest analogue to a procedural tree.")
BRANCHING,
@Desc("A thin, single-block-thick vertical fan plane that rises and widens with height like a sheet of fire or horn coral. Reads as a flat decorative blade rather than a volume.")
FAN,
@Desc("A rounded, noise-perturbed ellipsoid blob of brain coral that bulges out of the seafloor like a boulder, with an irregular wrinkled surface driven by 3D value noise.")
BRAIN,
@Desc("A stout, thick vertical column of coral block topped with a dense tip cluster. Wider and blunter than a tendril, reading as a solid coral pillar or stack.")
PILLAR,
@Desc("Several very thin (one block wide) wavy stalks that rise upward and wander laterally using value noise, like a clump of swaying coral whips or kelp-thin growths.")
TENDRIL
}
@@ -0,0 +1,314 @@
/*
* 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.objects.crystal;
import art.arcane.iris.builtin.anchor.ObjectPlaceMode;
import art.arcane.iris.builtin.carve.CarvingMode;
import art.arcane.iris.builtin.prepare.ObjectRotation;
import art.arcane.iris.builtin.prepare.ObjectTranslate;
import art.arcane.iris.builtin.stilt.StiltSettings;
import art.arcane.iris.builtin.vacuum.VacuumSettings;
import art.arcane.iris.builtin.validate.ObjectLimit;
import com.volmit.block.PaletteSpec;
import com.volmit.config.Desc;
import com.volmit.config.Snippet;
import com.volmit.config.MaxNumber;
import com.volmit.config.MinNumber;
import com.volmit.config.Ref;
import com.volmit.config.Reference;
import com.volmit.config.Required;
import java.util.Optional;
@Snippet("crystal")
@Desc("A single procedurally generated crystal cluster: a budding base blob with faceted, tapered shards radiating from it (geode / amethyst-style). Iris bakes a pool of deterministic variants from these settings and scatters them at world-gen time, exactly like an object placement but generated from scratch instead of loaded from an iob file. Built for caves.")
public final class Crystal {
@Desc("A human readable name used in logs and as the variant load key.")
private String name = "crystal";
@MinNumber(0)
@MaxNumber(1)
@Desc("The chance per chunk for this crystal cluster to attempt placement. Use density for multiple per chunk.")
private double chance = 0.2;
@MinNumber(1)
@Desc("If the chance check passes, attempt this many placements in the chunk.")
private int density = 1;
@MinNumber(1)
@MaxNumber(64)
@Desc("How many distinct variants to pre-bake for this crystal cluster. Higher means more variety at a small memory cost.")
private int variants = 6;
@Desc("The base seed for deterministic generation. The same seed and settings always bake the same variants.")
private long seed = 1337;
@Desc("The placement mode used to anchor the crystal cluster to the terrain.")
private ObjectPlaceMode mode = ObjectPlaceMode.CENTER_HEIGHT;
@Desc("Rotate this crystal cluster's placement.")
private ObjectRotation rotation = new ObjectRotation();
@Desc("Limit the max or min height of placement.")
private ObjectLimit clamp = new ObjectLimit();
@Desc("Whether this crystal cluster may place on the terrain surface, under carvings, or both. Crystals are meant for caves, so this defaults to CARVING_ONLY.")
private CarvingMode carvingSupport = CarvingMode.CARVING_ONLY;
@Desc("If true, the crystal cluster anchors on the terrain height ignoring the water surface.")
private boolean underwater = false;
@Desc("Translate (offset) this placement along each axis; for example set a negative y to sink it into the ground.")
private ObjectTranslate translate = new ObjectTranslate();
@Desc("Settings for the stilt place modes (STILT, MIN_STILT, FAST_STILT, CENTER_STILT, ERODE_STILT, ORGANIC_STILT).")
private StiltSettings stiltSettings;
@Desc("Settings for the vacuum place modes (VACUUM, VACUUM_HIGH, VACUUM_FAST, VACUUM_ORGANIC).")
private VacuumSettings vacuumSettings;
@Desc("The surface this crystal grows from (FLOOR shards up, CEILING shards down, WALL shards outward). This orients the baked geometry only.")
private CrystalSurface growthSurface = CrystalSurface.FLOOR;
@Required
@Desc("The primary crystal shard block, e.g. minecraft:amethyst_block. Ignored when blockPalette is set.")
@Ref(Reference.BLOCK)
private String block = "minecraft:amethyst_block";
@Desc("A noise-driven palette for the crystal shards (a prismatic mix, e.g. amethyst_block, calcite, tinted_glass). When set this overrides the single block, letting the shards mix blocks by noise. Palette wins.")
private PaletteSpec blockPalette;
@Desc("Optional block placed at the very tip of each shard for a different colored or sparkling point (e.g. minecraft:amethyst_cluster or glowstone). Ignored when tipPalette is set. If unset and glow is true, a light-emitting block is sprinkled among the tips instead.")
@Ref(Reference.BLOCK)
private String tipBlock = null;
@Desc("A noise-driven palette for the shard tips. When set this overrides the single tipBlock. Palette wins.")
private PaletteSpec tipPalette;
@MinNumber(0)
@MaxNumber(1)
@Desc("The chance per shard that its very tip is replaced by the tip block (or glow block).")
private double tipChance = 0.6;
@Desc("If true and no tipBlock/tipPalette is set, sprinkle a light-emitting block (the glowBlock) among the shard tips for a sparkling geode.")
private boolean glow = false;
@Desc("The light-emitting block sprinkled among the tips when glow is true and no tip block is configured.")
@Ref(Reference.BLOCK)
private String glowBlock = "minecraft:glowstone";
@Desc("Optional block for the budding base blob the shards grow from, e.g. minecraft:budding_amethyst or calcite. Ignored when basePalette is set. If unset, the base is built from the primary shard block.")
@Ref(Reference.BLOCK)
private String baseBlock = "minecraft:budding_amethyst";
@Desc("A noise-driven palette for the budding base blob. When set this overrides the single baseBlock. Palette wins.")
private PaletteSpec basePalette;
@MinNumber(0)
@Desc("Radius in blocks of the budding base blob the shards radiate from. 0 places no base blob (shards spring from a single point).")
private double baseRadius = 1.6;
@MinNumber(0)
@MaxNumber(1)
@Desc("How strongly value noise perturbs the surface of the base blob, for a lumpy organic budding base rather than a clean sphere.")
private double baseNoise = 0.35;
@MinNumber(1)
@Desc("Minimum number of shards radiating from the base.")
private int shardCountMin = 5;
@MinNumber(1)
@Desc("Maximum number of shards radiating from the base.")
private int shardCountMax = 11;
@MinNumber(1)
@Desc("Minimum length in blocks of a shard, measured from the base out to its pointed tip.")
private int shardLengthMin = 3;
@MinNumber(1)
@Desc("Maximum length in blocks of a shard, measured from the base out to its pointed tip.")
private int shardLengthMax = 8;
@MinNumber(0.5)
@Desc("Starting radius in blocks of a shard at its thick base end. The shard tapers from this down to a single block at the tip.")
private double shardBaseRadius = 1.4;
@MinNumber(0)
@MaxNumber(1)
@Desc("How aggressively each shard narrows from base to tip. 0 keeps a near-constant column; 1 tapers fully to a sharp point at the very tip. Each shard always ends in a single pointed block.")
private double shardTaper = 0.85;
@MinNumber(0)
@MaxNumber(90)
@Desc("The half-angle in degrees of the cone the shards fan within around the surface normal. 0 makes all shards parallel to the normal; larger values splay them outward into a starburst.")
private double spreadAngle = 45;
@Desc("How the shard azimuths are distributed around the normal (RANDOM for a chaotic clump, GOLDEN_ANGLE for an evenly spaced rosette).")
private CrystalDistribution distribution = CrystalDistribution.GOLDEN_ANGLE;
@MinNumber(0)
@MaxNumber(1)
@Desc("Per-shard angular randomness (0-1) added on top of the chosen distribution so the cluster never looks mechanically regular. 0 is perfectly distributed; 1 is heavily jittered.")
private double jitter = 0.25;
public Crystal() {
}
public String name() {
return name;
}
public double chance() {
return chance;
}
public int density() {
return density;
}
public int variants() {
return variants;
}
public long seed() {
return seed;
}
public ObjectPlaceMode mode() {
return mode == null ? ObjectPlaceMode.CENTER_HEIGHT : mode;
}
public ObjectRotation rotation() {
return rotation;
}
public ObjectLimit clamp() {
return clamp;
}
public CarvingMode carvingSupport() {
return carvingSupport == null ? CarvingMode.CARVING_ONLY : carvingSupport;
}
public boolean underwater() {
return underwater;
}
public ObjectTranslate translate() {
return translate;
}
/** Empty where the pack sets none. */
public Optional<StiltSettings> stiltSettings() {
return Optional.ofNullable(stiltSettings);
}
/** Empty where the pack sets none. */
public Optional<VacuumSettings> vacuumSettings() {
return Optional.ofNullable(vacuumSettings);
}
public CrystalSurface growthSurface() {
return growthSurface == null ? CrystalSurface.FLOOR : growthSurface;
}
public String block() {
return block;
}
/** Empty where the pack sets none. */
public Optional<PaletteSpec> blockPalette() {
return Optional.ofNullable(blockPalette);
}
/** Empty where the pack sets none. */
public Optional<String> tipBlock() {
return Optional.ofNullable(tipBlock);
}
/** Empty where the pack sets none. */
public Optional<PaletteSpec> tipPalette() {
return Optional.ofNullable(tipPalette);
}
public double tipChance() {
return tipChance;
}
public boolean glow() {
return glow;
}
public String glowBlock() {
return glowBlock;
}
public String baseBlock() {
return baseBlock;
}
/** Empty where the pack sets none. */
public Optional<PaletteSpec> basePalette() {
return Optional.ofNullable(basePalette);
}
public double baseRadius() {
return baseRadius;
}
public double baseNoise() {
return baseNoise;
}
public int shardCountMin() {
return shardCountMin;
}
public int shardCountMax() {
return shardCountMax;
}
public int shardLengthMin() {
return shardLengthMin;
}
public int shardLengthMax() {
return shardLengthMax;
}
public double shardBaseRadius() {
return shardBaseRadius;
}
public double shardTaper() {
return shardTaper;
}
public double spreadAngle() {
return spreadAngle;
}
public CrystalDistribution distribution() {
return distribution == null ? CrystalDistribution.GOLDEN_ANGLE : distribution;
}
public double jitter() {
return jitter;
}
}
@@ -0,0 +1,30 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2022 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.objects.crystal;
import com.volmit.config.Desc;
@Desc("How the shards of a crystal cluster are angularly distributed around the surface normal.")
public enum CrystalDistribution {
@Desc("Each shard gets a uniformly random azimuth around the normal. Produces a chaotic, naturally clumped cluster.")
RANDOM,
@Desc("Each shard's azimuth advances by the golden angle (~137.5 degrees) from the previous one. Produces an evenly spaced sunflower-like fan with no two shards overlapping, ideal for a geode rosette.")
GOLDEN_ANGLE
}
@@ -0,0 +1,33 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2022 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.objects.crystal;
import com.volmit.config.Desc;
@Desc("The surface a crystal cluster grows from. This only orients the baked geometry (which way the shards point); placement of the object into a cave is handled by the placement system, not here.")
public enum CrystalSurface {
@Desc("Grows from a cave floor. The budding base sits at the bottom and the shards point upward, fanning within the spread cone around the up axis. Built with positive py so the cluster grows up from the base layer.")
FLOOR,
@Desc("Grows from a cave ceiling. The budding base sits at the top and the shards point downward like stalactites, fanning within the spread cone around the down axis. Built with negative py so the cluster grows down from the ceiling.")
CEILING,
@Desc("Grows from a cave wall. The budding base hugs the wall and the shards point outward and slightly upward, fanning within the spread cone around a tilted normal so the cluster reads as a wall sconce of shards.")
WALL
}
@@ -0,0 +1,447 @@
/*
* 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.objects.formation;
import art.arcane.iris.builtin.anchor.ObjectPlaceMode;
import art.arcane.iris.builtin.carve.CarvingMode;
import art.arcane.iris.builtin.prepare.ObjectRotation;
import art.arcane.iris.builtin.prepare.ObjectTranslate;
import art.arcane.iris.builtin.stilt.StiltSettings;
import art.arcane.iris.builtin.vacuum.VacuumSettings;
import art.arcane.iris.builtin.validate.ObjectLimit;
import com.volmit.block.PaletteSpec;
import com.volmit.config.Desc;
import com.volmit.config.Snippet;
import com.volmit.config.MaxNumber;
import com.volmit.config.MinNumber;
import com.volmit.config.Ref;
import com.volmit.config.Reference;
import com.volmit.config.Required;
import java.util.Optional;
@Snippet("formation")
@Desc("A single procedurally generated natural formation, including rock landmarks and magical glacial silhouettes. Iris bakes a pool of deterministic variants from these settings and scatters them at world-gen time, exactly like an object placement but generated from scratch instead of loaded from an iob file.")
public final class Formation {
@Desc("A human readable name used in logs and as the variant load key.")
private String name = "formation";
@MinNumber(0)
@MaxNumber(1)
@Desc("The chance per chunk for this formation to attempt placement. Use density for multiple per chunk.")
private double chance = 0.02;
@MinNumber(1)
@Desc("If the chance check passes, attempt this many placements in the chunk.")
private int density = 1;
@MinNumber(1)
@MaxNumber(64)
@Desc("How many distinct variants to pre-bake for this formation. Higher means more variety at a small memory cost.")
private int variants = 6;
@Desc("The base seed for deterministic generation. The same seed and settings always bake the same variants.")
private long seed = 1337;
@Desc("The placement mode used to anchor the formation to the terrain.")
private ObjectPlaceMode mode = ObjectPlaceMode.CENTER_HEIGHT;
@Desc("Rotate this formation's placement.")
private ObjectRotation rotation = new ObjectRotation();
@Desc("Limit the max or min height of placement.")
private ObjectLimit clamp = new ObjectLimit();
@Desc("Whether this formation may place on the terrain surface, under carvings, or both.")
private CarvingMode carvingSupport = CarvingMode.SURFACE_ONLY;
@MinNumber(0)
@MaxNumber(16)
@Desc("Horizontal buffer, in blocks, beyond each lowest solid foundation block that must also be solid, un-carved ground.")
private int surfaceSupportBuffer = 3;
@Desc("If true, the formation anchors on the terrain height ignoring the water surface.")
private boolean underwater = false;
@Desc("Translate (offset) this placement along each axis; for example set a negative y to sink it into the ground.")
private ObjectTranslate translate = new ObjectTranslate();
@Desc("Settings for the stilt place modes (STILT, MIN_STILT, FAST_STILT, CENTER_STILT, ERODE_STILT, ORGANIC_STILT).")
private StiltSettings stiltSettings;
@Desc("Settings for the vacuum place modes (VACUUM, VACUUM_HIGH, VACUUM_FAST, VACUUM_ORGANIC).")
private VacuumSettings vacuumSettings;
@Desc("The overall silhouette of the formation. Drives which sculpting routine the generator uses.")
private FormationForm form = FormationForm.SPIRE;
@Required
@Desc("The main rock block, e.g. minecraft:stone. Ignored when blockPalette is set.")
@Ref(Reference.BLOCK)
private String block = "minecraft:stone";
@Desc("A noise-driven palette for the main rock body. When set this overrides the single block, letting the body mix blocks by noise.")
private PaletteSpec blockPalette;
@Desc("Optional caprock block placed on the top crown of the formation (and the wide overhanging cap for HOODOO). Ignored when capPalette is set. When null and capPalette is unset, the formation uses its main rock everywhere.")
@Ref(Reference.BLOCK)
private String capBlock = null;
@Desc("A noise-driven palette for the caprock. When set this overrides the single capBlock.")
private PaletteSpec capPalette;
@Desc("Optional palette of strata (horizontal colored bands) blended into the rock body by y level. When set, every strataThickness blocks of height switches to the next strata block, producing the signature banded look. Falls back to the main block where unset.")
private PaletteSpec strataPalette;
@MinNumber(1)
@MaxNumber(32)
@Desc("The thickness in blocks of each horizontal strata band when strataPalette is set.")
private int strataThickness = 3;
@MinNumber(1)
@Desc("Minimum total height of the formation in blocks.")
private int heightMin = 14;
@MinNumber(1)
@Desc("Maximum total height of the formation in blocks.")
private int heightMax = 26;
@MinNumber(1)
@Desc("Minimum base radius (half-width) of the formation in blocks.")
private int baseWidthMin = 3;
@MinNumber(1)
@Desc("Maximum base radius (half-width) of the formation in blocks.")
private int baseWidthMax = 6;
@MinNumber(0)
@Desc("The target radius (half-width) at the very top of the formation in blocks, before the profile is applied. 0 means taper to a point.")
private int topWidth = 0;
@Desc("The function used to shape the formation radius over its height.")
private FormationProfile profile = FormationProfile.TAPER;
@MinNumber(0)
@MaxNumber(1)
@Desc("The normalized height (0 base, 1 top) of the pinched waist for the PARABOLIC profile (used by HOODOO).")
private double profileWaist = 0.55;
@MinNumber(0)
@MaxNumber(1)
@Desc("The minimum radius fraction at the waist for the PARABOLIC profile. Lower values pinch the waist tighter.")
private double profileWaistFloor = 0.35;
@MinNumber(0)
@Desc("How far the formation leans, in degrees from vertical. 0 is perfectly upright. The whole body is sheared by this amount over its height.")
private double lean = 0;
@Desc("Compass direction in degrees the formation leans toward when lean is non-zero.")
private double leanAzimuth = 0;
@MinNumber(0)
@MaxNumber(1)
@Desc("Surface roughness from 0 (a clean smooth solid) to 1 (heavily eroded and pitted). Driven by 3D value noise that perturbs the radius so the formation never reads as a clean cylinder.")
private double roughness = 0.3;
@MinNumber(0)
@MaxNumber(1)
@Desc("Per-block surface jitter from 0 (none) to 1 (maximum). Randomly carves and adds isolated edge blocks to break up the silhouette.")
private double jitter = 0.15;
@MinNumber(0)
@Desc("Extra wide cap radius in blocks added on top for the HOODOO form, producing the overhanging mushroom caprock. 0 disables the overhang.")
private int hoodooCapRadius = 3;
@MinNumber(1)
@MaxNumber(6)
@Desc("The height in blocks of the HOODOO overhanging caprock slab.")
private int hoodooCapHeight = 3;
@MinNumber(0)
@Desc("How wide the ARCH opening is in blocks (the gap between the two legs). The arch span is rasterized over this width.")
private int archSpan = 10;
@MinNumber(1)
@Desc("The thickness in blocks of the ARCH legs and spanning curve.")
private int archThickness = 3;
@MinNumber(0)
@MaxNumber(1)
@Desc("How strongly an ARCH varies its leg steepness, crown position, depth bow and tube width between deterministic variants. 0 is symmetric and 1 is highly organic.")
private double archAsymmetry = 0.35;
@MinNumber(2)
@MaxNumber(12)
@Desc("How many separate columns make up a BASALT_COLUMN cluster. Each column gets a randomized height around the formation height range.")
private int basaltColumns = 5;
@MinNumber(1)
@Desc("The radius (half-width) in blocks of each individual column in a BASALT_COLUMN cluster.")
private int basaltColumnRadius = 1;
@MinNumber(0)
@MaxNumber(1)
@Desc("How much the heights of individual BASALT_COLUMN columns vary from each other, from 0 (all equal) to 1 (highly varied).")
private double basaltHeightVariance = 0.45;
@MinNumber(1)
@MaxNumber(12)
@Desc("How many tapered summits crown an ICEBERG formation.")
private int icebergPeaks = 3;
@MinNumber(2)
@MaxNumber(8)
@Desc("How many separated shards form a FISSURE.")
private int fractureCount = 3;
@MinNumber(1)
@MaxNumber(16)
@Desc("Open-air separation in blocks between the shards of a FISSURE.")
private int fractureSeparation = 2;
@MinNumber(0.25)
@MaxNumber(6)
@Desc("How many complete turns a SPIRAL makes from base to tip.")
private double spiralTurns = 1.5;
@MinNumber(1)
@MaxNumber(32)
@Desc("The starting distance in blocks between a SPIRAL and its open center.")
private int spiralRadius = 4;
@MinNumber(1)
@MaxNumber(8)
@Desc("The radius in blocks of the tube swept along a SPIRAL.")
private int spiralThickness = 2;
@MinNumber(1)
@MaxNumber(32)
@Desc("How far the hooked arm of an OVERHANG projects from its base.")
private int overhangReach = 8;
@MinNumber(0)
@MaxNumber(16)
@Desc("How many blocks the tip of an OVERHANG curls downward.")
private int overhangDrop = 3;
public Formation() {
}
public String name() {
return name;
}
public double chance() {
return chance;
}
public int density() {
return density;
}
public int variants() {
return variants;
}
public long seed() {
return seed;
}
public ObjectPlaceMode mode() {
return mode == null ? ObjectPlaceMode.CENTER_HEIGHT : mode;
}
public ObjectRotation rotation() {
return rotation;
}
public ObjectLimit clamp() {
return clamp;
}
public CarvingMode carvingSupport() {
return carvingSupport == null ? CarvingMode.SURFACE_ONLY : carvingSupport;
}
public int surfaceSupportBuffer() {
return surfaceSupportBuffer;
}
public boolean underwater() {
return underwater;
}
public ObjectTranslate translate() {
return translate;
}
/** Empty where the pack sets none. */
public Optional<StiltSettings> stiltSettings() {
return Optional.ofNullable(stiltSettings);
}
/** Empty where the pack sets none. */
public Optional<VacuumSettings> vacuumSettings() {
return Optional.ofNullable(vacuumSettings);
}
public FormationForm form() {
return form == null ? FormationForm.SPIRE : form;
}
public String block() {
return block;
}
/** Empty where the pack sets none. */
public Optional<PaletteSpec> blockPalette() {
return Optional.ofNullable(blockPalette);
}
/** Empty where the pack sets none. */
public Optional<String> capBlock() {
return Optional.ofNullable(capBlock);
}
/** Empty where the pack sets none. */
public Optional<PaletteSpec> capPalette() {
return Optional.ofNullable(capPalette);
}
/** Empty where the pack sets none. */
public Optional<PaletteSpec> strataPalette() {
return Optional.ofNullable(strataPalette);
}
public int strataThickness() {
return strataThickness;
}
public int heightMin() {
return heightMin;
}
public int heightMax() {
return heightMax;
}
public int baseWidthMin() {
return baseWidthMin;
}
public int baseWidthMax() {
return baseWidthMax;
}
public int topWidth() {
return topWidth;
}
public FormationProfile profile() {
return profile == null ? FormationProfile.TAPER : profile;
}
public double profileWaist() {
return profileWaist;
}
public double profileWaistFloor() {
return profileWaistFloor;
}
public double lean() {
return lean;
}
public double leanAzimuth() {
return leanAzimuth;
}
public double roughness() {
return roughness;
}
public double jitter() {
return jitter;
}
public int hoodooCapRadius() {
return hoodooCapRadius;
}
public int hoodooCapHeight() {
return hoodooCapHeight;
}
public int archSpan() {
return archSpan;
}
public int archThickness() {
return archThickness;
}
public double archAsymmetry() {
return archAsymmetry;
}
public int basaltColumns() {
return basaltColumns;
}
public int basaltColumnRadius() {
return basaltColumnRadius;
}
public double basaltHeightVariance() {
return basaltHeightVariance;
}
public int icebergPeaks() {
return icebergPeaks;
}
public int fractureCount() {
return fractureCount;
}
public int fractureSeparation() {
return fractureSeparation;
}
public double spiralTurns() {
return spiralTurns;
}
public int spiralRadius() {
return spiralRadius;
}
public int spiralThickness() {
return spiralThickness;
}
public int overhangReach() {
return overhangReach;
}
public int overhangDrop() {
return overhangDrop;
}
}
@@ -0,0 +1,45 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2022 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.objects.formation;
import com.volmit.config.Desc;
@Desc("The overall silhouette of a procedural natural formation. Each form drives a distinct sculpting routine in the formation generator.")
public enum FormationForm {
@Desc("A tall, slender needle of rock that tapers smoothly to a point at the top (a sharp pinnacle or stone spire).")
SPIRE,
@Desc("A column with a pinched, eroded waist and a wide overhanging caprock balanced on top (the classic desert hoodoo / mushroom rock).")
HOODOO,
@Desc("Two stout legs joined by a spanning curved bridge of rock overhead (a natural stone arch).")
ARCH,
@Desc("A chunky, blocky stack that tapers gently as it rises, like an isolated pillar of rock standing in water (a sea stack).")
SEA_STACK,
@Desc("A rounded, lumpy boulder formed from a noise-perturbed ellipsoid that sits low on the terrain.")
BOULDER,
@Desc("A tightly packed cluster of several vertical, near-hexagonal columns of varying height (a basalt column formation / giant's causeway).")
BASALT_COLUMN,
@Desc("A broad, faceted mound crowned by several irregular tapered peaks, suitable for icebergs and glacial outcrops.")
ICEBERG,
@Desc("Several separated, outward-leaning shards divided by open cracks.")
FISSURE,
@Desc("A tapered tube swept around a tightening helix, leaving open air through its curled center.")
SPIRAL,
@Desc("A grounded pillar that bends into a long hooked cantilever and curls downward at its tip.")
OVERHANG
}
@@ -0,0 +1,35 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2022 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.objects.formation;
import com.volmit.config.Desc;
@Desc("A width-shaping function evaluated over normalized height (0 at the base, 1 at the top). Controls how the formation radius scales between baseWidth at the bottom and topWidth at the top.")
public enum FormationProfile {
@Desc("Same radius at every height (a straight cylinder of constant baseWidth).")
CONSTANT,
@Desc("Radius ramps straight from baseWidth at the bottom to topWidth at the top.")
LINEAR,
@Desc("Radius shrinks smoothly toward a point as height increases (an ease that drives the SPIRE needle and gentle SEA_STACK taper).")
TAPER,
@Desc("Radius pinches to a narrow waist near profileWaist then widens again toward the top (the eroded waist used by HOODOO columns).")
PARABOLIC,
@Desc("Radius bulges out to its maximum in the middle of the height range and narrows at both ends (a barrel / bulged column).")
BULGE
}
@@ -0,0 +1,355 @@
/*
* 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.objects.fungi;
import art.arcane.iris.builtin.anchor.ObjectPlaceMode;
import art.arcane.iris.builtin.carve.CarvingMode;
import art.arcane.iris.builtin.prepare.ObjectRotation;
import art.arcane.iris.builtin.prepare.ObjectTranslate;
import art.arcane.iris.builtin.stilt.StiltSettings;
import art.arcane.iris.builtin.vacuum.VacuumSettings;
import art.arcane.iris.builtin.validate.ObjectLimit;
import com.volmit.block.PaletteSpec;
import com.volmit.config.Desc;
import com.volmit.config.Snippet;
import com.volmit.config.MaxNumber;
import com.volmit.config.MinNumber;
import com.volmit.config.Ref;
import com.volmit.config.Reference;
import com.volmit.config.Required;
import java.util.Optional;
@Snippet("fungus")
@Desc("A single procedurally generated fungus (giant mushroom or shelf fungus). Iris bakes a pool of deterministic variants from these settings and scatters them at world-gen time, exactly like an object placement but generated from scratch instead of loaded from an iob file. The fungus is built as a stem column with a cap dome grown on top, mirroring the trunk-and-canopy model used by procedural trees.")
public final class Fungus {
@Desc("A human readable name used in logs and as the variant load key.")
private String name = "fungus";
@MinNumber(0)
@MaxNumber(1)
@Desc("The chance per chunk for this fungus to attempt placement. Use density for multiple per chunk.")
private double chance = 0.4;
@MinNumber(1)
@Desc("If the chance check passes, attempt this many placements in the chunk.")
private int density = 1;
@MinNumber(1)
@MaxNumber(64)
@Desc("How many distinct variants to pre-bake for this fungus. Higher means more variety at a small memory cost.")
private int variants = 6;
@Desc("The base seed for deterministic generation. The same seed and settings always bake the same variants.")
private long seed = 1337;
@Desc("The placement mode used to anchor the fungus to the terrain.")
private ObjectPlaceMode mode = ObjectPlaceMode.CENTER_HEIGHT;
@Desc("Rotate this fungus's placement.")
private ObjectRotation rotation = new ObjectRotation();
@Desc("Limit the max or min height of placement.")
private ObjectLimit clamp = new ObjectLimit();
@Desc("Whether this fungus may place on the terrain surface, under carvings, or both.")
private CarvingMode carvingSupport = CarvingMode.SURFACE_ONLY;
@Desc("If true, the fungus anchors on the terrain height ignoring the water surface.")
private boolean underwater = false;
@Desc("Translate (offset) this placement along each axis; for example set a negative y to sink it into the ground.")
private ObjectTranslate translate = new ObjectTranslate();
@Desc("Settings for the stilt place modes (STILT, MIN_STILT, FAST_STILT, CENTER_STILT, ERODE_STILT, ORGANIC_STILT).")
private StiltSettings stiltSettings;
@Desc("Settings for the vacuum place modes (VACUUM, VACUUM_HIGH, VACUUM_FAST, VACUUM_ORGANIC).")
private VacuumSettings vacuumSettings;
@Required
@Desc("The stem block, e.g. minecraft:mushroom_stem. Ignored when stemPalette is set.")
@Ref(Reference.BLOCK)
private String stem = "minecraft:mushroom_stem";
@Desc("A noise-driven palette for the stem. When set this overrides the single stem block, letting the stem mix blocks by noise.")
private PaletteSpec stemPalette;
@Required
@Desc("The cap block, e.g. minecraft:red_mushroom_block. Ignored when capPalette is set.")
@Ref(Reference.BLOCK)
private String cap = "minecraft:red_mushroom_block";
@Desc("A noise-driven palette for the cap. When set this overrides the single cap block, letting the cap mix blocks by noise.")
private PaletteSpec capPalette;
@MinNumber(1)
@Desc("Minimum total stem height in blocks. Variants spread between this and stemHeightMax.")
private int stemHeightMin = 5;
@MinNumber(1)
@Desc("Maximum total stem height in blocks. Variants spread between stemHeightMin and this.")
private int stemHeightMax = 9;
@MinNumber(1)
@MaxNumber(3)
@Desc("Base stem width in blocks. 1 is a single column, 2 is a 2x2 stem, 3 is a chunky 3x3 trunk.")
private int stemWidth = 1;
@Desc("How far the stem leans away from vertical, in degrees. 0 is perfectly upright; small values give an organic tilt.")
private double stemCurve = 0;
@Desc("Compass direction in degrees the stem leans toward when stemCurve is non-zero.")
private double stemLeanAzimuth = 0;
@MinNumber(0)
@Desc("Amplitude in blocks of a gentle sideways wave applied up the stem so it is not a perfectly straight ruler.")
private double stemWaveAmplitude = 0.4;
@MinNumber(0.0001)
@Desc("The number of full sine wobbles applied over the stem height for the stem wave.")
private double stemWavePeriods = 1;
@Desc("The silhouette of the cap (dome, flat umbrella, funnel, cone, or wide shallow slab).")
private FungusCapShape capShape = FungusCapShape.DOME;
@MinNumber(1)
@Desc("Minimum cap radius in blocks (measured from the cap center to its rim).")
private int capRadiusMin = 3;
@MinNumber(1)
@Desc("Maximum cap radius in blocks (measured from the cap center to its rim).")
private int capRadiusMax = 5;
@MinNumber(1)
@MaxNumber(3)
@Desc("How many blocks thick the cap shell is. 1 is a thin skin, 3 is a fleshy slab.")
private int capThickness = 1;
@MinNumber(0)
@MaxNumber(1)
@Desc("Vertical flatten factor for the cap. 0 leaves the cap at full height, 1 squashes it flat into a disc.")
private double capSquish = 0.4;
@MinNumber(0)
@Desc("How far the cap rim droops downward, in degrees, curling the edge of the cap toward the ground.")
private double capDroop = 20;
@MinNumber(0)
@Desc("How far the cap radius extends past the stem before the rim begins, in blocks. Larger values make the cap overhang the stem more.")
private double capOverhang = 2;
@Desc("Optional block forming the gill layer on the underside of the cap (gills or a glow layer), e.g. minecraft:brown_mushroom_block or minecraft:shroomlight. Ignored when gillPalette is set or left null.")
@Ref(Reference.BLOCK)
private String gillBlock = null;
@Desc("A noise-driven palette for the underside gill layer. When set this overrides the single gillBlock.")
private PaletteSpec gillPalette;
@MinNumber(0)
@MaxNumber(1)
@Desc("The fraction of underside cap blocks replaced by the gill block when a gill block or palette is set.")
private double gillChance = 0.85;
@Desc("Optional block speckled across the top of the cap by noise (white toadstool dots, warts, glowing spots), e.g. minecraft:bone_block or minecraft:white_concrete. Ignored when spotPalette is set or left null.")
@Ref(Reference.BLOCK)
private String spotBlock = null;
@Desc("A noise-driven palette for the cap top spots. When set this overrides the single spotBlock.")
private PaletteSpec spotPalette;
@MinNumber(0)
@MaxNumber(1)
@Desc("The fraction of top cap blocks replaced by the spot block, selected by value noise so spots cluster naturally.")
private double spotChance = 0.18;
@Desc("If true, generate a bracket / shelf fungus instead of an upright mushroom: a small flat fan that grows sideways off a very short or absent stem, like a polypore clinging to a trunk.")
private boolean shelf = false;
@MinNumber(1)
@Desc("The radius in blocks of the sideways fan when shelf is true.")
private int shelfRadius = 3;
public Fungus() {
}
public String name() {
return name;
}
public double chance() {
return chance;
}
public int density() {
return density;
}
public int variants() {
return variants;
}
public long seed() {
return seed;
}
public ObjectPlaceMode mode() {
return mode == null ? ObjectPlaceMode.CENTER_HEIGHT : mode;
}
public ObjectRotation rotation() {
return rotation;
}
public ObjectLimit clamp() {
return clamp;
}
public CarvingMode carvingSupport() {
return carvingSupport == null ? CarvingMode.SURFACE_ONLY : carvingSupport;
}
public boolean underwater() {
return underwater;
}
public ObjectTranslate translate() {
return translate;
}
/** Empty where the pack sets none. */
public Optional<StiltSettings> stiltSettings() {
return Optional.ofNullable(stiltSettings);
}
/** Empty where the pack sets none. */
public Optional<VacuumSettings> vacuumSettings() {
return Optional.ofNullable(vacuumSettings);
}
public String stem() {
return stem;
}
/** Empty where the pack sets none. */
public Optional<PaletteSpec> stemPalette() {
return Optional.ofNullable(stemPalette);
}
public String cap() {
return cap;
}
/** Empty where the pack sets none. */
public Optional<PaletteSpec> capPalette() {
return Optional.ofNullable(capPalette);
}
public int stemHeightMin() {
return stemHeightMin;
}
public int stemHeightMax() {
return stemHeightMax;
}
public int stemWidth() {
return stemWidth;
}
public double stemCurve() {
return stemCurve;
}
public double stemLeanAzimuth() {
return stemLeanAzimuth;
}
public double stemWaveAmplitude() {
return stemWaveAmplitude;
}
public double stemWavePeriods() {
return stemWavePeriods;
}
public FungusCapShape capShape() {
return capShape == null ? FungusCapShape.DOME : capShape;
}
public int capRadiusMin() {
return capRadiusMin;
}
public int capRadiusMax() {
return capRadiusMax;
}
public int capThickness() {
return capThickness;
}
public double capSquish() {
return capSquish;
}
public double capDroop() {
return capDroop;
}
public double capOverhang() {
return capOverhang;
}
/** Empty where the pack sets none. */
public Optional<String> gillBlock() {
return Optional.ofNullable(gillBlock);
}
/** Empty where the pack sets none. */
public Optional<PaletteSpec> gillPalette() {
return Optional.ofNullable(gillPalette);
}
public double gillChance() {
return gillChance;
}
/** Empty where the pack sets none. */
public Optional<String> spotBlock() {
return Optional.ofNullable(spotBlock);
}
/** Empty where the pack sets none. */
public Optional<PaletteSpec> spotPalette() {
return Optional.ofNullable(spotPalette);
}
public double spotChance() {
return spotChance;
}
public boolean shelf() {
return shelf;
}
public int shelfRadius() {
return shelfRadius;
}
}
@@ -0,0 +1,35 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2022 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.objects.fungi;
import com.volmit.config.Desc;
@Desc("The silhouette of the mushroom cap. Each shape drives how the cap radius and thickness vary from its apex down to the rim, giving the fungus a distinct profile.")
public enum FungusCapShape {
@Desc("A rounded hemisphere cap that bulges up and curls slightly under at the rim, the classic red toadstool dome.")
DOME,
@Desc("A wide, nearly flat umbrella that holds its full radius almost to the edge before dropping, the brown-mushroom plate look.")
FLAT,
@Desc("An upturned bowl whose rim lifts higher than its center, cupping upward like a chanterelle or funnel mushroom.")
FUNNEL,
@Desc("A tall pointed cone that tapers from a broad base to a sharp apex, the witch-hat parasol silhouette.")
CONICAL,
@Desc("A very wide but shallow slab, a low overhanging shelf-like roof that spreads far past the stem with minimal vertical rise.")
FLAT_WIDE
}
@@ -0,0 +1,286 @@
/*
* 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.objects.ruin;
import art.arcane.iris.builtin.anchor.ObjectPlaceMode;
import art.arcane.iris.builtin.carve.CarvingMode;
import art.arcane.iris.builtin.prepare.ObjectRotation;
import art.arcane.iris.builtin.prepare.ObjectTranslate;
import art.arcane.iris.builtin.stilt.StiltSettings;
import art.arcane.iris.builtin.vacuum.VacuumSettings;
import art.arcane.iris.builtin.validate.ObjectLimit;
import com.volmit.block.PaletteSpec;
import com.volmit.config.Desc;
import com.volmit.config.Snippet;
import com.volmit.config.MaxNumber;
import com.volmit.config.MinItems;
import com.volmit.config.MinNumber;
import com.volmit.config.Ref;
import com.volmit.config.Reference;
import com.volmit.config.Required;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
@Snippet("ruin")
@Desc("A single procedurally generated ruin: a crumbling man-made structure (pillar, wall, arch, foundation slab, or rubble pile). Iris bakes a pool of deterministic variants from these settings and scatters them at world-gen time, exactly like an object placement but generated from scratch instead of loaded from an iob file. Weathering swaps blocks for mossy or cracked variants by noise, erosion deletes blocks so the shape reads as collapsed, and a buried fraction sinks the ruin into the terrain.")
public final class Ruin {
@Desc("A human readable name used in logs and as the variant load key (procedural/<name>#<index>).")
private String name = "ruin";
@MinNumber(0)
@MaxNumber(1)
@Desc("The chance (0-1) per chunk for this ruin to attempt placement. Use density to attempt more than one per chunk once the chance check passes.")
private double chance = 0.05;
@MinNumber(1)
@Desc("If the chance check passes, attempt this many placements in the chunk. Defaults to a single ruin per qualifying chunk.")
private int density = 1;
@MinNumber(1)
@MaxNumber(64)
@Desc("How many distinct variants to pre-bake for this ruin. Higher means more variety (different heights, gap patterns, erosion seeds) at a small memory cost.")
private int variants = 6;
@Desc("The base seed for deterministic generation. The same seed and settings always bake the same variants. Every random choice (size, weathering mask, erosion mask, accents) is derived from this.")
private long seed = 1337;
@Desc("The placement mode used to anchor the ruin to the terrain. MIN_HEIGHT plants the lowest footprint corner on the ground (good for slabs and rubble on slopes); CENTER_HEIGHT averages the footprint (good for tall pillars and arches).")
private ObjectPlaceMode mode = ObjectPlaceMode.MIN_HEIGHT;
@Desc("Rotate this ruin's placement so variants do not all face the same way.")
private ObjectRotation rotation = new ObjectRotation();
@Desc("Limit the max or min terrain height at which this ruin may place.")
private ObjectLimit clamp = new ObjectLimit();
@Desc("Whether this ruin may place on the terrain surface, under carvings (caves), or both. SURFACE_ONLY keeps ruins above ground.")
private CarvingMode carvingSupport = CarvingMode.SURFACE_ONLY;
@Desc("If true the ruin anchors on the terrain height ignoring the water surface, so it can sit submerged. If false (default) it anchors to the surface and avoids water.")
private boolean underwater = false;
@Desc("Translate (offset) this placement along each axis; for example set a negative y to sink it into the ground.")
private ObjectTranslate translate = new ObjectTranslate();
@Desc("Settings for the stilt place modes (STILT, MIN_STILT, FAST_STILT, CENTER_STILT, ERODE_STILT, ORGANIC_STILT).")
private StiltSettings stiltSettings;
@Desc("Settings for the vacuum place modes (VACUUM, VACUUM_HIGH, VACUUM_FAST, VACUUM_ORGANIC).")
private VacuumSettings vacuumSettings;
@Required
@Desc("The primary structural block, e.g. minecraft:cobblestone or minecraft:stone_bricks. Ignored when blockPalette is set. This is the bulk material of the ruin before weathering swaps some of it out.")
@Ref(Reference.BLOCK)
private String block = "minecraft:cobblestone";
@Desc("A noise-driven palette for the primary block. When set this overrides the single block, letting the structure mix materials by noise. Palette wins over the block string via IrisProceduralBlocks.resolve.")
private PaletteSpec blockPalette;
@Desc("The overall silhouette of the ruin: PILLAR (broken column), WALL (gapped segment), ARCH (two legs plus a curved span), FLOOR_SLAB (foundation patch), or RUBBLE (low scattered pile).")
private RuinForm form = RuinForm.PILLAR;
@MinNumber(1)
@Desc("Minimum structure height in blocks (PILLAR/WALL/ARCH height, slab thickness for FLOOR_SLAB, mound height for RUBBLE). Variants interpolate between this and heightMax.")
private int heightMin = 4;
@MinNumber(1)
@Desc("Maximum structure height in blocks. Variants interpolate between heightMin and this so taller and shorter ruins coexist.")
private int heightMax = 9;
@MinNumber(1)
@Desc("Minimum footprint width (X axis) in blocks: column/leg thickness for PILLAR/ARCH, wall thickness for WALL, slab width for FLOOR_SLAB, blob width for RUBBLE.")
private int widthMin = 1;
@MinNumber(1)
@Desc("Maximum footprint width (X axis) in blocks. Variants interpolate between widthMin and this.")
private int widthMax = 3;
@MinNumber(1)
@Desc("Minimum footprint length (Z axis) in blocks: wall run length, arch leg spacing, slab length, rubble blob length.")
private int lengthMin = 3;
@MinNumber(1)
@Desc("Maximum footprint length (Z axis) in blocks. Variants interpolate between lengthMin and this.")
private int lengthMax = 7;
@Desc("A palette of weathered variants (mossy/cracked block ids) blended over the structure by noise. When set this drives weathering; otherwise weatheredBlock is used.")
private PaletteSpec weatheringPalette;
@Desc("A single weathered block id used when weatheringPalette is not set, e.g. minecraft:mossy_cobblestone. Applied to a noise-selected fraction of the structure, biased toward the lower rows.")
@Ref(Reference.BLOCK)
private String weatheredBlock = "minecraft:mossy_cobblestone";
@MinNumber(0)
@MaxNumber(1)
@Desc("How much of the structure is replaced by weathered blocks (0 none, 1 nearly all). The replacement mask is value-noise driven and weighted so lower rows weather more than upper rows, mimicking moss climbing from the ground.")
private double mossiness = 0.45;
@MinNumber(0)
@MaxNumber(8)
@Desc("The scale of the weathering noise. Higher values produce smaller, busier moss/crack patches; lower values produce broad continuous weathered zones.")
private double weatheringScale = 1.0;
@MinNumber(0)
@MaxNumber(1)
@Desc("How crumbled the ruin is (0 intact, 1 mostly gone). Blocks whose value-noise falls below this threshold are deleted, so the shape reads as collapsed. Structural integrity is preserved: the bottom row and core legs are never eroded away.")
private double erosion = 0.25;
@MinNumber(0)
@MaxNumber(8)
@Desc("The scale of the erosion noise. Higher values knock out small speckled holes; lower values carve larger missing chunks out of the silhouette.")
private double erosionScale = 1.5;
@MinNumber(0)
@MaxNumber(1)
@Desc("How far the structure extends below the surface as a fraction of its height (0 sits fully on top, 1 sinks it a full height into the ground). The buried rows live at negative y so the ruin reads as settled and partly swallowed by the terrain.")
private double buriedFraction = 0.2;
@MinItems(1)
@Desc("Accent decorators applied after the ruin is built and eroded (moss carpets and lanterns on broken tops, vines and lichen on the faces, rubble and growth scattered around the base).")
private List<RuinDecorator> accents = List.of();
public Ruin() {
}
public String name() {
return name;
}
public double chance() {
return chance;
}
public int density() {
return density;
}
public int variants() {
return variants;
}
public long seed() {
return seed;
}
public ObjectPlaceMode mode() {
return mode == null ? ObjectPlaceMode.MIN_HEIGHT : mode;
}
public ObjectRotation rotation() {
return rotation;
}
public ObjectLimit clamp() {
return clamp;
}
public CarvingMode carvingSupport() {
return carvingSupport == null ? CarvingMode.SURFACE_ONLY : carvingSupport;
}
public boolean underwater() {
return underwater;
}
public ObjectTranslate translate() {
return translate;
}
/** Empty where the pack sets none. */
public Optional<StiltSettings> stiltSettings() {
return Optional.ofNullable(stiltSettings);
}
/** Empty where the pack sets none. */
public Optional<VacuumSettings> vacuumSettings() {
return Optional.ofNullable(vacuumSettings);
}
public String block() {
return block;
}
/** Empty where the pack sets none. */
public Optional<PaletteSpec> blockPalette() {
return Optional.ofNullable(blockPalette);
}
public RuinForm form() {
return form == null ? RuinForm.PILLAR : form;
}
public int heightMin() {
return heightMin;
}
public int heightMax() {
return heightMax;
}
public int widthMin() {
return widthMin;
}
public int widthMax() {
return widthMax;
}
public int lengthMin() {
return lengthMin;
}
public int lengthMax() {
return lengthMax;
}
/** Empty where the pack sets none. */
public Optional<PaletteSpec> weatheringPalette() {
return Optional.ofNullable(weatheringPalette);
}
public String weatheredBlock() {
return weatheredBlock;
}
public double mossiness() {
return mossiness;
}
public double weatheringScale() {
return weatheringScale;
}
public double erosion() {
return erosion;
}
public double erosionScale() {
return erosionScale;
}
public double buriedFraction() {
return buriedFraction;
}
public List<RuinDecorator> accents() {
return accents == null ? List.of() : Collections.unmodifiableList(accents);
}
}
@@ -0,0 +1,78 @@
/*
* 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.objects.ruin;
import com.volmit.block.PaletteSpec;
import com.volmit.config.Desc;
import com.volmit.config.Snippet;
import com.volmit.config.MaxNumber;
import com.volmit.config.MinNumber;
import com.volmit.config.Ref;
import com.volmit.config.Reference;
import com.volmit.config.Required;
import java.util.Optional;
@Snippet("ruin-decorator")
@Desc("An accent block applied to a generated ruin after it is built and eroded, such as moss carpets on broken tops, vines on the faces, or rubble scattered around the base.")
public final class RuinDecorator {
@Desc("Where on the ruin this accent is placed. TOP sits on the highest block of each column, SURFACE clings to air-facing vertical faces, BASE_SCATTER rings the ground footprint around the base.")
private RuinDecoratorTarget target = RuinDecoratorTarget.TOP;
@Required
@Desc("The block id to place, e.g. minecraft:moss_carpet or minecraft:vine. Ignored when palette is set.")
@Ref(Reference.BLOCK)
private String block = "";
@Desc("A noise-driven palette for this decorator. When set this overrides the single block, letting the accent mix blocks by noise. Resolved through IrisProceduralBlocks.resolve so the palette wins over the string.")
private PaletteSpec palette;
@MinNumber(0)
@MaxNumber(1)
@Desc("The chance (0-1) per candidate position for this decorator to actually place. 1 covers every candidate, lower values leave sparse, patchy accents.")
private double chance = 0.4;
@MinNumber(1)
@Desc("For the BASE_SCATTER target, how many blocks beyond the ruin footprint the scatter ring extends outward in each direction. Higher values fling rubble and growth further from the structure.")
private int scatterRadius = 2;
public RuinDecorator() {
}
public RuinDecoratorTarget target() {
return target == null ? RuinDecoratorTarget.TOP : target;
}
public String block() {
return block;
}
/** Empty where the pack sets none. */
public Optional<PaletteSpec> palette() {
return Optional.ofNullable(palette);
}
public double chance() {
return chance;
}
public int scatterRadius() {
return scatterRadius;
}
}
@@ -0,0 +1,31 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2022 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.objects.ruin;
import com.volmit.config.Desc;
@Desc("Where a ruin accent block is placed after the ruin has been built and eroded.")
public enum RuinDecoratorTarget {
@Desc("On top of the highest surviving block in each column (moss carpets, snow, sculk, lanterns on broken tops).")
TOP,
@Desc("On air-facing vertical sides of any surviving block (vines, glow lichen, climbing growth on the ruin faces).")
SURFACE,
@Desc("Scattered across the ground footprint around the y=0 base ring, wider than the structure itself (loose rubble, mushrooms, grass tufts ringing the ruin).")
BASE_SCATTER
}
@@ -0,0 +1,35 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2022 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.objects.ruin;
import com.volmit.config.Desc;
@Desc("The overall silhouette of a procedural ruin. Each form rasterizes a different crumbling man-made shape from the same size, weathering, and erosion settings.")
public enum RuinForm {
@Desc("A broken vertical column. A square trunk (widthMin..widthMax footprint) rises to a randomized height then snaps off with a jagged crown, leaving a toppled stub. Use for ancient pillars and obelisk stumps.")
PILLAR,
@Desc("A standing wall segment. A flat slab spanning lengthMin..lengthMax long and heightMin..heightMax tall, thickness widthMin..widthMax, punched through with noise-driven gaps and a ragged top edge. Use for collapsed building sides and fortifications.")
WALL,
@Desc("A freestanding arch. Two legs spaced by lengthMin..lengthMax joined at the top by a rasterized semicircular span (the lintel), so the structure literally arches. Use for gateways, aqueduct bays, and ruined doorways.")
ARCH,
@Desc("A flat foundation patch. A single (or few) block-thick slab covering a widthMin..lengthMax footprint at ground level, heavily eroded into an irregular outline. Use for floor remnants, plazas, and building foundations.")
FLOOR_SLAB,
@Desc("A low scattered debris pile. A noise blob of partial blocks mounded near the ground, tallest at the center and thinning toward the edges. Use for collapsed-structure rubble and scree.")
RUBBLE
}
@@ -0,0 +1,45 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2022 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.objects.tree;
import com.volmit.config.Desc;
@Desc("Controls the compass direction (azimuth) of trunk lean as it rises, or the direction each branch is thrown.")
public enum TreeAzimuthMode {
@Desc("A single fixed azimuth.")
CONSTANT,
@Desc("Azimuth ramps straight from start to end with height.")
LINEAR,
@Desc("Azimuth winds around the trunk a number of turns (corkscrew).")
SPIRAL,
@Desc("Azimuth oscillates with a sine wave.")
SINE,
@Desc("Azimuth wanders using deterministic noise.")
NOISE,
@Desc("Each branch picks a uniformly random azimuth (falls back to constant for trunk lean).")
RANDOM,
@Desc("Phyllotaxis: each successive branch is offset by the 137.5 degree golden angle for the most natural spiral packing (branches).")
GOLDEN_ANGLE,
@Desc("Each successive branch is thrown to the opposite side (180 degrees apart).")
ALTERNATING,
@Desc("Branches are grouped into evenly spaced whorls of azimuthWhorlCount around each ring.")
WHORL,
@Desc("Azimuth zigzags by +/- amplitude on alternating branches.")
ZIGZAG
}
@@ -0,0 +1,47 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2022 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.objects.tree;
import com.volmit.config.Desc;
@Desc("Controls how the chance of spawning a branch varies with trunk height (0 at the base, 1 at the top).")
public enum TreeBranchProbability {
@Desc("Same branch chance at every height.")
CONSTANT,
@Desc("Ramps straight from base chance to crown chance.")
LINEAR,
@Desc("S-curve that switches on around a midpoint height.")
SIGMOID,
@Desc("Chance rises with height raised to an exponent, clustering branches near the crown.")
TOP_HEAVY,
@Desc("Bell curve peaking in a height band.")
GAUSSIAN,
@Desc("Irregular organic branching from deterministic noise.")
NOISE,
@Desc("Chance falls with height (1-t)^exponent, clustering branches near the base.")
BOTTOM_HEAVY,
@Desc("Regular whorl rings of branches at evenly spaced heights (periods controls count).")
PERIODIC,
@Desc("Branches only within a height window around mean +/- std.")
BAND,
@Desc("Inverse of GAUSSIAN: branches avoid the mean band and favor base and crown.")
INVERSE_GAUSSIAN,
@Desc("Exponential decay from the base upward (constant * e^-exponent*t).")
EXPONENTIAL_DECAY
}
@@ -0,0 +1,237 @@
/*
* 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.objects.tree;
import com.volmit.config.Desc;
import com.volmit.config.Snippet;
import com.volmit.config.MaxNumber;
import com.volmit.config.MinNumber;
import java.util.Optional;
@Snippet("tree-branches")
@Desc("A branch system that throws limbs out of the trunk and places a leaf ball at each tip. When present, branches drive the canopy and only the topmost crown disc of the profile is still placed.")
public final class TreeBranches {
@Desc("How branch spawn chance varies over trunk height.")
private TreeBranchProbability probabilityFunction = TreeBranchProbability.TOP_HEAVY;
@MinNumber(0)
@Desc("Branch chance for the CONSTANT probability function.")
private double probabilityConstant = 0.5;
@MinNumber(0)
@Desc("Branch chance at the base for the LINEAR probability function.")
private double probabilityBase = 0;
@MinNumber(0)
@Desc("Branch chance at the crown for the LINEAR probability function.")
private double probabilityCrown = 1;
@Desc("Steepness for the SIGMOID probability function.")
private double probabilitySteepness = 10;
@Desc("Midpoint height (0-1) for the SIGMOID probability function.")
private double probabilityMidpoint = 0.7;
@Desc("Exponent for the TOP_HEAVY probability function.")
private double probabilityExponent = 2;
@Desc("Mean height (0-1) for the GAUSSIAN probability function.")
private double probabilityMean = 0.7;
@Desc("Standard deviation for the GAUSSIAN probability function.")
private double probabilityStd = 0.15;
@Desc("Noise scale for the NOISE probability function.")
private double probabilityScale = 1;
@MinNumber(0)
@Desc("Number of whorl rings over the trunk height for the PERIODIC probability function.")
private double probabilityPeriods = 5;
@Desc("How branch length varies over trunk height.")
private TreeFunction lengthFunction = TreeFunction.LINEAR;
@MinNumber(0)
@Desc("Branch length at the base for the LINEAR length function.")
private double lengthBase = 1;
@MinNumber(0)
@Desc("Branch length at the crown for the LINEAR length function.")
private double lengthCrown = 4;
@MinNumber(0)
@Desc("Branch length for the CONSTANT length function.")
private double lengthConstant = 3;
@MinNumber(0)
@Desc("Maximum branch length for the SIGMOID, LOG and PARABOLIC length functions.")
private double lengthMax = 4;
@Desc("Steepness for the SIGMOID length function.")
private double lengthSteepness = 5;
@Desc("How the compass direction of each branch is chosen.")
private TreeAzimuthMode azimuthMode = TreeAzimuthMode.RANDOM;
@Desc("Fixed azimuth in degrees when azimuthMode is CONSTANT.")
private double azimuth = 0;
@Desc("Elevation angle in degrees from horizontal. 0 is flat, positive points up, negative droops down.")
private double elevation = 0;
@MinNumber(0)
@MaxNumber(1)
@Desc("How much each branch sags/droops along its length (catenary). 0 is a straight branch; higher values arc the branch and its tip downward.")
private double sag = 0;
@MinNumber(0)
@MaxNumber(6)
@Desc("How many recursive levels of sub-branches to grow. 0 is none, 1 is a single level, 2+ produces fractal branching.")
private int branchDepth = 1;
@Desc("If true, branches are clamped to never droop below horizontal (useful for upright species).")
private boolean leafStartUp = false;
@MinNumber(0)
@Desc("Leaf ball radius placed at each branch tip.")
private int clusterRadius = 2;
@Desc("How the branch tip leaf cluster fills.")
private TreeLeafMode clusterMode = TreeLeafMode.TRIMMED;
@MinNumber(0)
@Desc("Fill density for the branch tip leaf cluster when clusterMode is density or noise.")
private double clusterDensity = 0.85;
@Desc("Optional one level of recursive sub-branches sprouting from each branch tip.")
private TreeSubBranches subBranches = null;
public TreeBranches() {
}
public TreeBranchProbability probabilityFunction() {
return probabilityFunction == null ? TreeBranchProbability.TOP_HEAVY : probabilityFunction;
}
public double probabilityConstant() {
return probabilityConstant;
}
public double probabilityBase() {
return probabilityBase;
}
public double probabilityCrown() {
return probabilityCrown;
}
public double probabilitySteepness() {
return probabilitySteepness;
}
public double probabilityMidpoint() {
return probabilityMidpoint;
}
public double probabilityExponent() {
return probabilityExponent;
}
public double probabilityMean() {
return probabilityMean;
}
public double probabilityStd() {
return probabilityStd;
}
public double probabilityScale() {
return probabilityScale;
}
public double probabilityPeriods() {
return probabilityPeriods;
}
public TreeFunction lengthFunction() {
return lengthFunction == null ? TreeFunction.LINEAR : lengthFunction;
}
public double lengthBase() {
return lengthBase;
}
public double lengthCrown() {
return lengthCrown;
}
public double lengthConstant() {
return lengthConstant;
}
public double lengthMax() {
return lengthMax;
}
public double lengthSteepness() {
return lengthSteepness;
}
public TreeAzimuthMode azimuthMode() {
return azimuthMode == null ? TreeAzimuthMode.RANDOM : azimuthMode;
}
public double azimuth() {
return azimuth;
}
public double elevation() {
return elevation;
}
public double sag() {
return sag;
}
public int branchDepth() {
return branchDepth;
}
public boolean leafStartUp() {
return leafStartUp;
}
public int clusterRadius() {
return clusterRadius;
}
public TreeLeafMode clusterMode() {
return clusterMode == null ? TreeLeafMode.TRIMMED : clusterMode;
}
public double clusterDensity() {
return clusterDensity;
}
/** Empty where the pack sets none. */
public Optional<TreeSubBranches> subBranches() {
return Optional.ofNullable(subBranches);
}
}
@@ -0,0 +1,102 @@
/*
* 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.objects.tree;
import com.volmit.config.Desc;
import com.volmit.config.Snippet;
import com.volmit.config.MaxNumber;
import com.volmit.config.MinItems;
import com.volmit.config.MinNumber;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
@Snippet("tree-canopy")
@Desc("The leaf crown of a procedural tree. Built from stacked dome-shaped discs (driven by the profile or by explicit layers) and optionally a branch system.")
public final class TreeCanopy {
@MinNumber(0)
@MaxNumber(180)
@Desc("Elevation angle in degrees from vertical for each leaf dome. 90 is a flat disc, below 90 domes downward into a sphere, above 90 flares outward into an umbrella.")
private double startAngle = 90;
@MinNumber(0)
@MaxNumber(1)
@Desc("Vertical scale of the canopy volume. Lower values flatten the crown.")
private double squish = 1;
@Desc("How leaves fill each canopy disc.")
private TreeLeafMode mode = TreeLeafMode.TRIMMED;
@MinNumber(0)
@MaxNumber(1)
@Desc("Fill probability used by the density and noise leaf modes.")
private double leafDensity = 0.85;
@MinNumber(0.1)
@Desc("Horizontal X stretch of the crown for elliptical or wind-blown shapes. 1 is circular.")
private double crownStretchX = 1;
@MinNumber(0.1)
@Desc("Horizontal Z stretch of the crown for elliptical or wind-blown shapes. 1 is circular.")
private double crownStretchZ = 1;
@MinItems(1)
@Desc("Optional explicit crown discs. When provided these replace the profile-driven layers and let you sculpt the silhouette by hand.")
private List<TreeLayer> layers = List.of();
@Desc("Optional branch system. When present, branches build most of the canopy and only the topmost profile disc is still placed as a crown.")
private TreeBranches branches = null;
public TreeCanopy() {
}
public double startAngle() {
return startAngle;
}
public double squish() {
return squish;
}
public TreeLeafMode mode() {
return mode == null ? TreeLeafMode.TRIMMED : mode;
}
public double leafDensity() {
return leafDensity;
}
public double crownStretchX() {
return crownStretchX;
}
public double crownStretchZ() {
return crownStretchZ;
}
public List<TreeLayer> layers() {
return layers == null ? List.of() : Collections.unmodifiableList(layers);
}
/** Empty where the pack sets none. */
public Optional<TreeBranches> branches() {
return Optional.ofNullable(branches);
}
}
@@ -0,0 +1,85 @@
/*
* 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.objects.tree;
import com.volmit.block.PaletteSpec;
import com.volmit.config.Desc;
import com.volmit.config.Snippet;
import com.volmit.config.MaxNumber;
import com.volmit.config.MinNumber;
import com.volmit.config.Ref;
import com.volmit.config.Reference;
import com.volmit.config.Required;
import java.util.Optional;
@Snippet("tree-decorator")
@Desc("An accent block applied to a generated tree such as fruit on branch tips, vines on the trunk, snow on the crown, or a glowing underside.")
public final class TreeDecorator {
@Desc("Where this decorator is placed on the tree.")
private TreeDecoratorTarget target = TreeDecoratorTarget.BRANCH_TIP;
@Required
@Desc("The block id to place, e.g. minecraft:magma_block. Ignored when palette is set.")
@Ref(Reference.BLOCK)
private String block = "";
@Desc("A noise-driven palette for this decorator. When set this overrides the single block.")
private PaletteSpec palette;
@MinNumber(0)
@MaxNumber(1)
@Desc("The chance per candidate position for this decorator to place.")
private double chance = 0.5;
@MinNumber(1)
@Desc("Maximum strand length downward for the CANOPY_HANG target (random 1..length per column).")
private int length = 1;
@Desc("If true the block's facing is oriented away from the trunk (for trunk-mounted fences/gates/banners).")
private boolean axisAware = false;
public TreeDecorator() {
}
public TreeDecoratorTarget target() {
return target == null ? TreeDecoratorTarget.BRANCH_TIP : target;
}
public String block() {
return block;
}
/** Empty where the pack sets none. */
public Optional<PaletteSpec> palette() {
return Optional.ofNullable(palette);
}
public double chance() {
return chance;
}
public int length() {
return length;
}
public boolean axisAware() {
return axisAware;
}
}
@@ -0,0 +1,45 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2022 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.objects.tree;
import com.volmit.config.Desc;
@Desc("Where a tree decorator block is placed.")
public enum TreeDecoratorTarget {
@Desc("At the tip of each generated branch (vines, fruit, lanterns).")
BRANCH_TIP,
@Desc("On air-facing sides of trunk and branch blocks (vines, moss).")
TRUNK_SURFACE,
@Desc("On top of the highest block in each column (snow, sculk).")
CANOPY_TOP,
@Desc("One block below the lowest leaf in each column (glowing underside).")
CANOPY_BOTTOM,
@Desc("Around the y=0 ring at the base of the trunk (roots, mushrooms).")
TRUNK_BASE,
@Desc("On air-facing sides of leaf blocks (berries, lights nestled in the foliage).")
LEAF_SURFACE,
@Desc("Hanging strands of up to 'length' blocks below the lowest leaf in each column (vines, icicles).")
CANOPY_HANG,
@Desc("On the top face of trunk and branch blocks (moss, snow on limbs).")
BRANCH_SURFACE,
@Desc("One block above the very top of the trunk (nest, beehive, beacon).")
TRUNK_TOP,
@Desc("Scattered across the ground footprint around the base, wider than the trunk-base ring.")
GROUND_SCATTER
}
@@ -0,0 +1,47 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2022 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.objects.tree;
import com.volmit.config.Desc;
@Desc("A shaping function evaluated over normalized height (0 at the base, 1 at the top). Used for trunk width, trunk curve and branch length.")
public enum TreeFunction {
@Desc("Same value at every height.")
CONSTANT,
@Desc("Ramps straight from start to end.")
LINEAR,
@Desc("S-curve transition controlled by steepness.")
SIGMOID,
@Desc("Logarithmic falloff controlled by base.")
LOG,
@Desc("Sine ripple controlled by period and amplitude.")
SINE,
@Desc("Parabolic pinch, narrowest at peakOffset.")
PARABOLIC,
@Desc("Geometric (exponential) interpolation from start to end.")
EXPONENTIAL,
@Desc("Square-root ease: fast change low, slow high.")
SQRT,
@Desc("Hard step that jumps from start to end at the threshold (peakOffset).")
STEP,
@Desc("Bell bulge peaking in the middle of the height range.")
BELL,
@Desc("Smoothstep ease-in-out (3t^2 - 2t^3).")
EASE_IN_OUT
}
@@ -0,0 +1,45 @@
/*
* 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.objects.tree;
import com.volmit.config.Desc;
import com.volmit.config.Snippet;
import com.volmit.config.MinNumber;
@Snippet("tree-layer")
@Desc("An explicit canopy disc at a given vertical offset and radius. Define a list of these to bypass the profile and sculpt the crown by hand.")
public final class TreeLayer {
@Desc("The vertical offset of this disc, measured in blocks above the trunk base.")
private int yOffset = 0;
@MinNumber(0.5)
@Desc("The radius of this leaf disc in blocks.")
private double radius = 2;
public TreeLayer() {
}
public int yOffset() {
return yOffset;
}
public double radius() {
return radius;
}
}
@@ -0,0 +1,43 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2022 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.objects.tree;
import com.volmit.config.Desc;
@Desc("How leaves fill a disc or cluster.")
public enum TreeLeafMode {
@Desc("Corner-trimmed disc/sphere for a rounded silhouette.")
TRIMMED,
@Desc("Completely filled disc/sphere.")
FILLED,
@Desc("Seeded probabilistic falloff toward the edge controlled by leafDensity.")
DENSITY,
@Desc("Seeded value-noise mask controlled by leafDensity.")
NOISE,
@Desc("Only the outer shell is placed, leaving the interior hollow.")
HOLLOW,
@Desc("Quadratic radial gradient: dense at the center, thinning sharply toward the edge.")
GRADIENT,
@Desc("Coarse low-frequency noise that forms clumps and gaps of foliage.")
CLUMPED,
@Desc("Trimmed with heavy random erosion of the outer ring for a ragged, weathered look.")
TATTERED,
@Desc("Very thin scattering of leaves across the volume.")
SPARSE
}
@@ -0,0 +1,53 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2022 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.objects.tree;
import com.volmit.config.Desc;
@Desc("Named canopy presets that drive default layer radii and shape, scaled to the tree height.")
public enum TreeProfile {
@Desc("Rounded broadleaf crown.")
OAK,
@Desc("Slim upright broadleaf crown.")
BIRCH,
@Desc("Narrow conifer cone.")
SPRUCE,
@Desc("Tall thin crown concentrated near the very top.")
JUNGLE,
@Desc("Flat shallow umbrella crown.")
ACACIA,
@Desc("Dense rounded broadleaf crown.")
DARK_OAK,
@Desc("Flat wide umbrella crown compressed into the top quarter (vanilla dark oak look).")
DARK_OAK_FLAT,
@Desc("Extra wide flat umbrella that overlaps into a continuous roofed canopy.")
DARK_OAK_FLAT_WIDE,
@Desc("Broad rounded blossom crown.")
CHERRY,
@Desc("Bare trunk with a small tuft of fronds only at the very top.")
PALM,
@Desc("Broad crown with wide drooping radii, ideal with a low startAngle to make a weeping skirt.")
WILLOW,
@Desc("Very narrow tall crown hugging the trunk (cypress / lombardy poplar).")
COLUMNAR,
@Desc("Squat, wide, low crown for shrubs and saplings.")
BUSH,
@Desc("Giant conifer cone for 2x2 mega spruce trunks.")
MEGA_SPRUCE
}
@@ -0,0 +1,31 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2022 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.objects.tree;
import com.volmit.config.Desc;
@Desc("How a procedural tree's root system is built below (and around) the trunk base.")
public enum TreeRootStyle {
@Desc("A single tapering taproot straight down from the base.")
TAPROOT,
@Desc("A taproot plus a ring of flared buttress legs that splay outward as they descend (default).")
BUTTRESS,
@Desc("Visible above-ground prop roots that arch out and down from the lower trunk to the ground (mangrove style).")
STILT
}
@@ -0,0 +1,50 @@
/*
* 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.objects.tree;
import com.volmit.config.Desc;
import com.volmit.config.Snippet;
import com.volmit.config.MinNumber;
import com.volmit.config.Ref;
import com.volmit.config.Reference;
import com.volmit.config.Required;
@Snippet("tree-secondary-leaf")
@Desc("A weighted accent leaf or foliage block scattered through the canopy (blossoms, shroomlight, berries).")
public final class TreeSecondaryLeaf {
@Required
@Desc("The block id to scatter, e.g. minecraft:shroomlight")
@Ref(Reference.BLOCK)
private String block = "";
@MinNumber(0)
@Desc("The relative weight of this block among the secondary leaves.")
private int weight = 1;
public TreeSecondaryLeaf() {
}
public String block() {
return block;
}
public int weight() {
return weight;
}
}
@@ -0,0 +1,93 @@
/*
* 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.objects.tree;
import com.volmit.config.Desc;
import com.volmit.config.Snippet;
import com.volmit.config.MaxNumber;
import com.volmit.config.MinNumber;
@Snippet("tree-sub-branches")
@Desc("One recursive level of sub-branches sprouting from each primary branch tip.")
public final class TreeSubBranches {
@MinNumber(1)
@Desc("How many sub-branches sprout from each primary branch tip.")
private int count = 1;
@Desc("Pitch deflection in degrees applied to each sub-branch relative to its parent. Positive bends up, negative droops down. Cumulative pitch past 90 makes sub-branches point downward.")
private double pitchDelta = 0;
@Desc("Yaw (horizontal) spread in degrees fanned between sub-branches.")
private double yawDelta = 45;
@MinNumber(0)
@Desc("Sub-branch length as a fraction of its parent branch length.")
private double lengthScale = 0.5;
@MinNumber(0)
@MaxNumber(1)
@Desc("How much each sub-branch sags/droops along its length (catenary).")
private double sag = 0;
@MinNumber(0)
@Desc("Leaf ball radius placed at each sub-branch tip.")
private int clusterRadius = 1;
@Desc("How the sub-branch tip leaf cluster fills.")
private TreeLeafMode clusterMode = TreeLeafMode.TRIMMED;
@MinNumber(0)
@Desc("Fill density for the sub-branch leaf cluster when clusterMode is density or noise.")
private double clusterDensity = 0.85;
public TreeSubBranches() {
}
public int count() {
return count;
}
public double pitchDelta() {
return pitchDelta;
}
public double yawDelta() {
return yawDelta;
}
public double lengthScale() {
return lengthScale;
}
public double sag() {
return sag;
}
public int clusterRadius() {
return clusterRadius;
}
public TreeLeafMode clusterMode() {
return clusterMode == null ? TreeLeafMode.TRIMMED : clusterMode;
}
public double clusterDensity() {
return clusterDensity;
}
}
@@ -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 <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.prepare;
import com.volmit.config.Desc;
import com.volmit.config.Snippet;
/** How an object is turned around each axis, written as a placement's {@code rotation}. */
@Snippet("object-rotator")
@Desc("Configures rotation for iris")
public final class ObjectRotation {
private static final double QUARTER_TURN_DEGREES = 90;
@Desc("If this rotator is enabled or not")
private boolean enabled = true;
@Desc("The x axis rotation")
private AxisRotationClamp xAxis = new AxisRotationClamp();
@Desc("The y axis rotation")
private AxisRotationClamp yAxis = AxisRotationClamp.of(true, false, 0, 0, QUARTER_TURN_DEGREES);
@Desc("The z axis rotation")
private AxisRotationClamp zAxis = new AxisRotationClamp();
public ObjectRotation() {
}
public boolean enabled() {
return enabled;
}
public AxisRotationClamp xAxis() {
return xAxis;
}
public AxisRotationClamp yAxis() {
return yAxis;
}
public AxisRotationClamp zAxis() {
return zAxis;
}
}
@@ -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.prepare;
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;
/** How far an object is shifted from where it would be placed, written as a placement's {@code translate}. */
@Snippet("object-translator")
@Desc("Translate objects")
public final class ObjectTranslate {
@MinNumber(-128)
@MaxNumber(128)
@Desc("The x shift in blocks")
private int x = 0;
@Required
@MinNumber(-128)
@MaxNumber(128)
@Desc("The y shift in blocks")
private int y = 0;
@MinNumber(-128)
@MaxNumber(128)
@Desc("Adds an additional amount of height randomly (translateY + rand(0 - yRandom))")
private int yRandom = 0;
@MinNumber(-128)
@MaxNumber(128)
@Desc("The z shift in blocks")
private int z = 0;
public ObjectTranslate() {
}
public int x() {
return x;
}
public int y() {
return y;
}
public int yRandom() {
return yRandom;
}
public int z() {
return z;
}
}