Merge branch 'wave2/e2'

# Conflicts:
#	src/main/java/art/arcane/iris/engine/framework/IrisStructureLocator.java
#	src/main/java/art/arcane/iris/engine/mantle/components/ObjectModule.java
#	src/main/java/art/arcane/iris/engine/object/placement/BlocksModule.java
#	src/main/java/art/arcane/iris/engine/object/placement/IrisObjectPlacement.java
#	src/main/java/art/arcane/iris/engine/object/world/dimension/IrisDimension.java
This commit is contained in:
piexel committed 2026-10-09 22:33:42 +02:00
commit cd7584b2ab
126 files changed
+4291 -2047

No files matched your search

@@ -0,0 +1,39 @@
/*
* 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.anchor;
/** How a placement mode finds the height of an object placed without a requested height. */
public enum AnchorSampling {
/** The surface at the object's center, or the floor of the cave it is placed in. */
CENTER,
/** The highest surface under any column of the object. */
HIGHEST,
/** The highest surface under the object's four corners. */
HIGHEST_CORNER,
/** The lowest surface under any column of the object. */
LOWEST,
/** The lowest surface under the object's four corners. */
LOWEST_CORNER,
/** The surface at the object's center, ignoring caves; each block then follows its own column. */
SURFACE,
/** The translation alone, in open air. */
TRANSLATION,
/** The requested height, even when negative. */
REQUESTED
}
@@ -0,0 +1,130 @@
/*
* 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.anchor;
import com.volmit.config.Desc;
@Desc("Object Place modes are useful for positioning objects just right. The default value is CENTER_HEIGHT.")
public enum ObjectPlaceMode {
@Desc("The default place mode. This mode picks a center point (where the center of the object will be) and takes the height. That height is used for the whole object.")
CENTER_HEIGHT(AnchorSampling.CENTER, StiltShape.NONE),
@Desc("Samples a lot of points where the object will cover (horizontally) and picks the highest height, that height is then used to place the object. This mode is useful for preventing any part of your object from being buried though it will float off of cliffs.")
MAX_HEIGHT(AnchorSampling.HIGHEST, StiltShape.NONE),
@Desc("Samples only 4 points where the object will cover (horizontally) and picks the highest height, that height is then used to place the object. This mode is useful for preventing any part of your object from being buried though it will float off of cliffs.\"")
FAST_MAX_HEIGHT(AnchorSampling.HIGHEST_CORNER, StiltShape.NONE),
@Desc("Samples a lot of points where the object will cover (horizontally) and picks the lowest height, that height is then used to place the object. This mode is useful for preventing any part of your object from overhanging a cliff though it gets buried a lot")
MIN_HEIGHT(AnchorSampling.LOWEST, StiltShape.NONE),
@Desc("Samples only 4 points where the object will cover (horizontally) and picks the lowest height, that height is then used to place the object. This mode is useful for preventing any part of your object from overhanging a cliff though it gets buried a lot")
FAST_MIN_HEIGHT(AnchorSampling.LOWEST_CORNER, StiltShape.NONE),
@Desc("Stilting is MAX_HEIGHT but it repeats the bottom most block of your object until it hits the surface. This is expensive because it has to first sample every height value for each x,z position of your object. Avoid using this unless its structures for performance reasons.")
STILT(AnchorSampling.HIGHEST, StiltShape.STRAIGHT),
@Desc("Just like stilting but very inaccurate. Useful for stilting a lot of objects without too much care on accuracy (you can use the over-stilt value to force stilts under ground further)")
FAST_STILT(AnchorSampling.HIGHEST_CORNER, StiltShape.STRAIGHT),
@Desc("Stilting is MIN_HEIGHT but it repeats the bottom most block of your object until it hits the surface. This is expensive because it has to first sample every height value for each x,z position of your object. Avoid using this unless its structures for performance reasons.")
MIN_STILT(AnchorSampling.LOWEST, StiltShape.STRAIGHT),
@Desc("Just like MIN_STILT but very inaccurate. Useful for stilting a lot of objects without too much care on accuracy (you can use the over-stilt value to force stilts under ground further)")
FAST_MIN_STILT(AnchorSampling.LOWEST_CORNER, StiltShape.STRAIGHT),
@Desc("Stilting is CENTER_HEIGHT but it repeats the bottom most block of your object until it hits the surface. This is expensive because it has to first sample every height value for each x,z position of your object. Avoid using this unless its structures for performance reasons.")
CENTER_STILT(AnchorSampling.CENTER, StiltShape.STRAIGHT),
@Desc("Erode stilting tapers columns downward like an ice cream cone. Blocks near the center extend deepest while edge blocks drop off first. Blocks are randomly skipped in the lower portion for a rough organic eroded texture.")
ERODE_STILT(AnchorSampling.HIGHEST, StiltShape.ERODE),
@Desc("Organic stilting scans straight down from the bottom of the object to the first solid block (the cave floor, or terrain) and fills the gap with the object's own bottom block. Each column stops at a slightly different, noise-varied depth and the lower portion is randomly broken up, so the underside reads as rough organic roots rather than a flat disc. Designed for objects placed inside caves so they connect to the floor instead of floating. Tune with stilt-settings (organicMaxScan, organicJitter, organicScratch).")
ORGANIC_STILT(AnchorSampling.CENTER, StiltShape.ORGANIC),
@Desc("Hangs the object upside-down from a cave ceiling. The object is flipped vertically (its tip points down like a stalactite) and its top is anchored to the ceiling, while an organic, noise-varied stilt grows up into the ceiling so it never floats below the roof. Use inside caves; tune with stilt-settings (organicMaxScan, organicJitter, organicScratch).")
CEILING_HANG(AnchorSampling.CENTER, StiltShape.CEILING),
@Desc("Anchors the object at the terrain surface (plus translate.y) like CENTER_HEIGHT, then bends the surrounding terrain to be flush with the object's base. Columns inside the object footprint are raised (or lowered) to meet the base, and the deformation falls off parabolically out to a radius so the terrain smoothly blends back to its natural height. Use this to seat a floating/translated object on the ground without a flat stilt disc, e.g. a cube translated up 10 on a mountain pulls the terrain up to meet it. Tune with vacuum-settings (radius, falloff).")
VACUUM(AnchorSampling.CENTER, StiltShape.NONE),
@Desc("VACUUM with a larger radius and finer per-column sampling for the smoothest terrain blend. More expensive.")
VACUUM_HIGH(AnchorSampling.CENTER, StiltShape.NONE),
@Desc("VACUUM with a smaller radius and coarser sampling for performance. Use when seating many objects.")
VACUUM_FAST(AnchorSampling.CENTER, StiltShape.NONE),
@Desc("VACUUM whose falloff radius is perturbed by noise per column, so the terrain meets the object with an irregular organic edge rather than a clean parabolic bowl.")
VACUUM_ORGANIC(AnchorSampling.CENTER, StiltShape.NONE),
@Desc("VACUUM whose terrain bend is bent by smooth coherent simplex noise so the surface meets the object with a gently rolling, wavy slope instead of the ragged white-noise edge of VACUUM_ORGANIC or a clean parabolic bowl. The object itself still seats flush; the waves fade to zero under the object and at the outer rim, peaking across the mid-slope. Tune with vacuum-settings (waveAmplitude, waveScale).")
VACUUM_WAVY(AnchorSampling.CENTER, StiltShape.NONE),
@Desc("Samples the height of the terrain at every x,z position of your object and pushes it down to the surface. It's pretty much like a melt function over the terrain.")
PAINT(AnchorSampling.SURFACE, StiltShape.NONE),
@Desc("Places the object in pure air at an absolute Y driven entirely by translate.y (plus optional translate.yRandom). Terrain height, underwater, and carving anchor checks are skipped. Use this for floating islands, sky structures, clouds, or blimps where the object must not be translated to the ground.")
FLOATING(AnchorSampling.TRANSLATION, StiltShape.NONE),
@Desc("Raw stamp at the caller-supplied (x, y, z). No terrain sampling, no stilting, no Y recomputation, no underwater or carving anchor guards. Used internally to route native Minecraft structure pieces (villages etc.) through the Iris object placer.")
STRUCTURE_PIECE(AnchorSampling.REQUESTED, StiltShape.NONE);
private final AnchorSampling anchor;
private final StiltShape stilt;
ObjectPlaceMode(AnchorSampling anchor, StiltShape stilt) {
this.anchor = anchor;
this.stilt = stilt;
}
/** How a placement without a requested height finds one. */
public AnchorSampling anchor() {
return anchor;
}
/** The stilt this mode grows under or above the object. */
public StiltShape stilt() {
return stilt;
}
public boolean isVacuum() {
return this == VACUUM || this == VACUUM_HIGH || this == VACUUM_FAST || this == VACUUM_ORGANIC || this == VACUUM_WAVY;
}
}
@@ -0,0 +1,32 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.anchor;
/** What a placement mode grows between the object and the ground or ceiling. */
public enum StiltShape {
NONE,
/** Repeats the bottom layer straight down to the surface. */
STRAIGHT,
/** Like {@link #STRAIGHT}, tapering toward the edges and broken up at depth. */
ERODE,
/** Repeats the bottom layer down to the first solid block, each column a little different. */
ORGANIC,
/** Hangs the flipped object from a ceiling and grows its top layer up into it. */
CEILING
}
@@ -0,0 +1,69 @@
/*
* 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.blocks;
import com.volmit.block.BlockSpec;
import com.volmit.block.PaletteSpec;
import com.volmit.config.Desc;
import com.volmit.config.MaxNumber;
import com.volmit.config.MinItems;
import com.volmit.config.MinNumber;
import com.volmit.config.Required;
import com.volmit.config.Snippet;
import java.util.Collections;
import java.util.List;
/** One find-and-replace of an object placement's blocks, an entry of the placement's {@code edit}. */
@Snippet("object-block-replacer")
@Desc("Find and replace object materials")
public final class ObjectReplace {
@MinItems(1)
@Required
@Desc("Find this block")
private List<BlockSpec> find = List.of();
@Required
@Desc("Replace it with this block palette")
private PaletteSpec replace = PaletteSpec.of(List.of(BlockSpec.of("stone")));
@Desc("Exactly match the block data or not")
private boolean exact = false;
@MinNumber(0)
@MaxNumber(1)
@Desc("Modifies the chance the block is replaced")
private float chance = 1;
public ObjectReplace() {
}
public List<BlockSpec> find() {
return find == null ? List.of() : Collections.unmodifiableList(find);
}
public PaletteSpec replace() {
return replace == null ? PaletteSpec.of(List.of(BlockSpec.of("stone"))) : replace;
}
public boolean exact() {
return exact;
}
public float chance() {
return chance;
}
}
@@ -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.carve;
import com.volmit.config.Desc;
@Desc("Defines if an object is allowed to place in carvings, surfaces or both.")
public enum CarvingMode {
@Desc("Only place this object on surfaces (NOT under carvings)")
SURFACE_ONLY,
@Desc("Only place this object under carvings (NOT on the surface)")
CARVING_ONLY,
@Desc("This object can place anywhere")
ANYWHERE;
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
public boolean supportsCarving() {
return this.equals(ANYWHERE) || this.equals(CARVING_ONLY);
}
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
public boolean supportsSurface() {
return this.equals(ANYWHERE) || this.equals(SURFACE_ONLY);
}
}
@@ -0,0 +1,21 @@
package art.arcane.iris.builtin.carve;
import com.volmit.config.Desc;
@Desc("Defines which carved-space anchor to target for cave object placement.")
public enum CaveAnchorMode {
@Desc("Use the active cave profile default anchor mode.")
PROFILE_DEFAULT,
@Desc("Target cave floor anchors where carved space has solid support below.")
FLOOR,
@Desc("Target cave ceiling anchors where carved space has solid support above.")
CEILING,
@Desc("Target carved positions with no immediate solid support above or below.")
CENTER,
@Desc("Target any carved-space anchor.")
ANY
}
@@ -0,0 +1,66 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.carve;
import com.volmit.config.Desc;
import com.volmit.config.MaxNumber;
import com.volmit.config.MinNumber;
import com.volmit.config.Range;
import com.volmit.noise.NoiseStyle;
/** One more layer of noise a cave profile blends into its density, an entry of the profile's {@code modules}. */
@Desc("Represents a modular cave-density layer.")
public final class CaveFieldModule {
@Desc("Density style used by this module.")
private NoiseStyle style = NoiseStyle.of("CELLULAR_IRIS_DOUBLE");
@MinNumber(0)
@Desc("Layer contribution multiplier.")
private double weight = 1;
@MinNumber(-1)
@MaxNumber(1)
@Desc("Threshold offset applied to this layer before blending.")
private double threshold = 0;
@Desc("Vertical bounds where this module can contribute, in engine-local Y where 0 is the bottom of the dimension, not world Y.")
private Range verticalRange = Range.of(0, 384);
@Desc("Invert this module before weighting.")
private boolean invert = false;
public CaveFieldModule() {
}
public NoiseStyle style() {
return style;
}
public double weight() {
return weight;
}
public double threshold() {
return threshold;
}
public Range verticalRange() {
return verticalRange;
}
public boolean invert() {
return invert;
}
}
@@ -0,0 +1,303 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.carve;
import art.arcane.iris.builtin.anchor.ObjectPlaceMode;
import com.volmit.config.Desc;
import com.volmit.config.MaxNumber;
import com.volmit.config.MinItems;
import com.volmit.config.MinNumber;
import com.volmit.config.Range;
import com.volmit.config.Snippet;
import com.volmit.noise.NoiseStyle;
import com.volmit.noise.StyledRange;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
/**
* A 3D cave profile as packs write it for a dimension, region or biome ({@code caveProfile}) or under
* {@code snippet/cave-profile/}: the noise fields that decide where caves are, how they meet the surface, where
* cave fluid may sit and how objects find anchors in them. IrisApi types only; the carving module builds the noise.
*/
@Snippet("cave-profile")
@Desc("Represents a configurable 3D cave profile.")
public final class CaveProfile {
@Desc("Enable profile-driven cave carving.")
private boolean enabled = false;
@Desc("Global vertical bounds for profile cave carving, in engine-local Y where 0 is the bottom of the dimension, not world Y.")
private Range verticalRange = Range.of(0, 384);
@MinNumber(0)
@MaxNumber(128)
@Desc("Vertical fade range applied near cave profile min/max bounds to avoid abrupt hard-stop ceilings/floors.")
private int verticalEdgeFade = 20;
@MinNumber(0)
@MaxNumber(1)
@Desc("Strength of the vertical edge fade at cave profile min/max bounds.")
private double verticalEdgeFadeStrength = 0.18;
@Desc("Base density style for cave field generation.")
private NoiseStyle baseDensityStyle = NoiseStyle.of("CELLULAR_IRIS_DOUBLE");
@Desc("Detail density style blended into base caves.")
private NoiseStyle detailDensityStyle = NoiseStyle.of("SIMPLEX");
@Desc("Warp style used to distort cave coordinates.")
private NoiseStyle warpStyle = NoiseStyle.of("FLAT");
@MinNumber(0)
@Desc("Base cave field multiplier.")
private double baseWeight = 1;
@MinNumber(0)
@Desc("Detail cave field multiplier.")
private double detailWeight = 0.35;
@MinNumber(0)
@Desc("Coordinate warp strength for cave fields.")
private double warpStrength = 0;
@Desc("Threshold range used for carve cutoff decisions.")
private StyledRange densityThreshold = StyledRange.of(-0.2, 0.2, NoiseStyle.of("CELLULAR_IRIS_DOUBLE"));
@MinNumber(0)
@MaxNumber(1)
@Desc("Extra threshold bias subtracted from sampled threshold before carve tests.")
private double thresholdBias = 0.16;
@MinNumber(1)
@MaxNumber(8)
@Desc("Vertical sample step used while evaluating cave density.")
private int sampleStep = 1;
@Desc("Use adaptive cave density prediction so only threshold-adjacent cells fall back to full-resolution evaluation.")
private boolean adaptiveSampling = true;
@MinNumber(2)
@MaxNumber(4)
@Desc("Horizontal adaptive predictor tuning. The carver always samples the predictor grid at a fixed step of 8; values below 8 only widen the ambiguity margin slightly and do not tighten the grid.")
private int adaptiveSampleStep = 2;
@MinNumber(0)
@MaxNumber(1)
@Desc("Additional adaptive ambiguity margin used before the cave predictor falls back to exact sampling.")
private double adaptiveThresholdMargin = 0.04;
@MinNumber(0)
@MaxNumber(64)
@Desc("Minimum solid clearance below terrain surface where carving may occur.")
private int surfaceClearance = 4;
@Desc("Allow profile-driven cave carving to break through terrain surface in selected columns.")
private boolean allowSurfaceBreak = true;
@Desc("Noise style used to decide where surface-breaking cave columns are allowed.")
private NoiseStyle surfaceBreakStyle = NoiseStyle.of("SIMPLEX").withZoom(0.08);
@MinNumber(-1)
@MaxNumber(1)
@Desc("Minimum signed surface-break noise value required before near-surface carving is allowed.")
private double surfaceBreakNoiseThreshold = 0.62;
@MinNumber(0)
@MaxNumber(64)
@Desc("Near-surface depth window used for surface-break carve logic.")
private int surfaceBreakDepth = 18;
@MinNumber(0)
@MaxNumber(1)
@Desc("Additional threshold boost applied while carving in the surface-break depth window.")
private double surfaceBreakThresholdBoost = 0.2;
@MinNumber(0)
@MaxNumber(64)
@Desc("Minimum depth below terrain surface required for cave-only object anchor placement.")
private int objectMinDepthBelowSurface = 6;
@MinItems(1)
@Desc("Additional layered cave-density modules.")
private List<CaveFieldModule> modules = List.of();
@Desc("Default cave anchor mode for cave-only object placement.")
private CaveAnchorMode defaultObjectAnchor = CaveAnchorMode.FLOOR;
@Desc("Default placement mode for cave objects. Only applies to placements that are still on the default CENTER_HEIGHT mode; an explicit mode on the placement always wins. Stilt modes tile the object base block down to the cave floor surface. FAST_MIN_STILT is recommended for cave objects to prevent floating.")
private ObjectPlaceMode defaultObjectPlaceMode;
@MinNumber(1)
@MaxNumber(8)
@Desc("Vertical scan step used while searching cave anchors.")
private int anchorScanStep = 1;
@MinNumber(1)
@MaxNumber(64)
@Desc("Maximum random column retries while searching a valid cave object anchor in the chunk.")
private int anchorSearchAttempts = 6;
@Desc("Allow cave fluid placement from the dimension fluid palette below fluid level.")
private boolean allowFluid = true;
@MinNumber(0)
@MaxNumber(64)
@Desc("Minimum depth below terrain surface required before cave fluid may be placed.")
private int fluidMinDepthBelowSurface = 12;
@Desc("Require solid floor support below cave fluid to reduce unsupported fluid flows.")
private boolean fluidRequiresFloor = true;
@Desc("Allow cave lava placement based on lava height.")
private boolean allowLava = true;
public CaveProfile() {
}
public boolean enabled() {
return enabled;
}
public Range verticalRange() {
return verticalRange;
}
public int verticalEdgeFade() {
return verticalEdgeFade;
}
public double verticalEdgeFadeStrength() {
return verticalEdgeFadeStrength;
}
public NoiseStyle baseDensityStyle() {
return baseDensityStyle;
}
public NoiseStyle detailDensityStyle() {
return detailDensityStyle;
}
public NoiseStyle warpStyle() {
return warpStyle;
}
public double baseWeight() {
return baseWeight;
}
public double detailWeight() {
return detailWeight;
}
public double warpStrength() {
return warpStrength;
}
public StyledRange densityThreshold() {
return densityThreshold;
}
public double thresholdBias() {
return thresholdBias;
}
public int sampleStep() {
return sampleStep;
}
public boolean adaptiveSampling() {
return adaptiveSampling;
}
public int adaptiveSampleStep() {
return adaptiveSampleStep;
}
public double adaptiveThresholdMargin() {
return adaptiveThresholdMargin;
}
public int surfaceClearance() {
return surfaceClearance;
}
public boolean allowSurfaceBreak() {
return allowSurfaceBreak;
}
public NoiseStyle surfaceBreakStyle() {
return surfaceBreakStyle;
}
public double surfaceBreakNoiseThreshold() {
return surfaceBreakNoiseThreshold;
}
public int surfaceBreakDepth() {
return surfaceBreakDepth;
}
public double surfaceBreakThresholdBoost() {
return surfaceBreakThresholdBoost;
}
public int objectMinDepthBelowSurface() {
return objectMinDepthBelowSurface;
}
public List<CaveFieldModule> modules() {
return modules == null ? List.of() : Collections.unmodifiableList(modules);
}
public CaveAnchorMode defaultObjectAnchor() {
return defaultObjectAnchor == null ? CaveAnchorMode.FLOOR : defaultObjectAnchor;
}
/** The mode cave objects take where their placement has none of its own; empty when the profile sets none. */
public Optional<ObjectPlaceMode> defaultObjectPlaceMode() {
return Optional.ofNullable(defaultObjectPlaceMode);
}
public int anchorScanStep() {
return anchorScanStep;
}
public int anchorSearchAttempts() {
return anchorSearchAttempts;
}
public boolean allowFluid() {
return allowFluid;
}
public int fluidMinDepthBelowSurface() {
return fluidMinDepthBelowSurface;
}
public boolean fluidRequiresFloor() {
return fluidRequiresFloor;
}
public boolean allowLava() {
return allowLava;
}
}
@@ -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.floating;
import com.volmit.config.Desc;
@Desc("Controls how floating-child island underside blocks choose their palette.")
public enum FloatingBottomPaletteMode {
@Desc("Use the normal top-down biome layer depth for the whole island column.")
DEPTH,
@Desc("Use the target biome's top palette from both the island top and underside, meeting in the middle.")
MIRROR_TOP,
@Desc("Use bottomPalette near the underside and the target biome's normal palette near the top.")
CUSTOM
}
@@ -0,0 +1,396 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.floating;
import art.arcane.iris.engine.object.placement.IrisObjectPlacement;
import art.arcane.iris.engine.object.terrain.IrisBiomePaletteLayer;
import com.volmit.config.Desc;
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.Snippet;
import com.volmit.noise.NoiseStyle;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.OptionalInt;
/**
* A floating island above a biome's terrain, an entry of the biome's {@code floatingChildBiomes}: where its footprint
* is, how high it floats, how its top, underside and walls are shaped, and which objects, decorators and water it
* gets. Noise and options are IrisApi types; the object placements and palette layers the island hosts are
* Iris's own classes, which the host describes itself, so this class leaves the pack module jar only when those
* become settings of modules.
*/
@Snippet("floating-child-biome")
@Desc("Declares a floating biome layer above this biome's terrain. A 2D footprint noise decides which columns are part of the island (threshold + style control blankets, swirls, scattered blobs). The top profile is driven by the target biome's own terrain generators (so a mountains biome produces real peaks, desert produces real dunes). The bottom tail hanging below is a separately configurable noise (pick VASCULAR for drippy roots, FRACTAL_RM_SIMPLEX for crystalline spikes, PERLIN for smooth rounded bowls).")
public final class FloatingChildBiome {
public static final int DEFAULT_EDGE_TAPER_WIDTH = 10;
public static final double DEFAULT_EDGE_TAPER_EXPONENT = 1.0D;
private static final NoiseStyle DEFAULT_BOTTOM_STYLE = NoiseStyle.of("SIMPLEX");
private static final NoiseStyle DEFAULT_TOP_SHAPE_STYLE = NoiseStyle.of("SIMPLEX");
private static final NoiseStyle DEFAULT_ALTITUDE_STYLE = NoiseStyle.of("SIMPLEX");
private static final NoiseStyle DEFAULT_PICKER_STYLE = NoiseStyle.of("SIMPLEX");
private static final NoiseStyle DEFAULT_EDGE_TAPER_VARIATION_STYLE = NoiseStyle.of("SIMPLEX").withZoom(0.18D);
private static final NoiseStyle DEFAULT_FOOTPRINT_STYLE = NoiseStyle.of("SIMPLEX");
@Ref(Reference.PACK_BIOME)
@Desc("The target biome whose visual design (layers, palette, decorators, surface objects, derivative, and — when topShapeMode=BIOME — generator profile) drives the floating island. Leave empty to reuse the parent biome (self).")
private String biome = "";
@MinNumber(1)
@MaxNumber(512)
@Desc("Selection rarity when multiple floating child entries are defined on one parent biome. Lower is more common.")
private int rarity = 1;
@Desc("2D noise that decides which columns are part of this island. Set feature size via the style's own zoom field (e.g. {\"style\":\"CELLULAR\",\"zoom\":0.3} for ~30-block shards, {\"style\":\"SIMPLEX\",\"zoom\":1.0} for ~100-block blobs). Pick SIMPLEX for smooth blobs, CELLULAR for angular shards, VASCULAR for vein/branch strips, FRACTAL_FBM_SIMPLEX for large irregular blanket regions. Fracture (domain warp) this to get swirly silhouettes.")
private NoiseStyle footprintStyle = DEFAULT_FOOTPRINT_STYLE;
@MinNumber(0)
@MaxNumber(1)
@Desc("Coverage threshold (0..1). Roughly the fraction of the world that is NOT island: 0.0 = every column becomes island, 0.5 ≈ 50% of columns, 0.8 ≈ sparse scattered ~20% coverage, 1.0 = no islands at all. Values near 0.5 feel most natural.")
private double footprintThreshold = 0.5;
@MinNumber(2)
@MaxNumber(32)
@Desc("Width in blocks of the rounded transition from the floating island contour to its full thickness. Smaller values make a tighter edge; larger values make a broader rounded underside.")
private int edgeTaperWidth = DEFAULT_EDGE_TAPER_WIDTH;
@MinNumber(0.25)
@MaxNumber(4)
@Desc("Shape exponent for the rounded edge. Values below 1 fill into a softer, fuller curve; values above 1 keep the rim thinner before rising into the island interior.")
private double edgeTaperExponent = DEFAULT_EDGE_TAPER_EXPONENT;
@Desc("Broad 2D noise that organically varies the rounded edge without changing the island footprint. Low-frequency SIMPLEX or PERLIN styles give coherent natural contours; high-frequency or cellular styles can look speckled.")
private NoiseStyle edgeTaperVariationStyle = DEFAULT_EDGE_TAPER_VARIATION_STYLE;
@MinNumber(0)
@MaxNumber(8)
@Desc("Maximum number of blocks by which edgeTaperVariationStyle locally widens or narrows the rounded transition. 0 disables variation. Runtime keeps the resulting local width between 2 and 32 blocks so every protected rim column remains connected.")
private double edgeTaperVariationAmplitude = 0.0D;
@Desc("Picker noise used when multiple floating child entries exist. Samples once per column to deterministically choose which entry's footprint is tested there. Use a large style zoom (e.g. zoom: 4 for ~400-block regions) so each entry owns broad coherent areas.")
private NoiseStyle pickerStyle = DEFAULT_PICKER_STYLE;
@Desc("Altitude noise — varies the base platform Y across one island so it isn't a flat plane. Use a large style zoom (e.g. zoom: 2 for ~200-block altitude patches) so an island sits at roughly one altitude.")
private NoiseStyle altitudeStyle = DEFAULT_ALTITUDE_STYLE;
@MinNumber(0)
@MaxNumber(2032)
@Desc("Minimum absolute world Y where the island base can sit. Island altitude is independent of the parent biome's terrain height; altitudeStyle noise varies the base between min and max per column.")
private int minHeightAboveSurface = 160;
@MinNumber(0)
@MaxNumber(2032)
@Desc("Maximum absolute world Y where the island base can sit. Island altitude is independent of the parent biome's terrain height; altitudeStyle noise varies the base between min and max per column.")
private int maxHeightAboveSurface = 210;
@Desc("Optional absolute minimum world Y for the island base. When set, baseY is clamped upward so the tail bottom stays above this value.")
private Integer minAbsoluteY = null;
@Desc("Optional absolute maximum world Y for the island top. When set, the top is clamped downward.")
private Integer maxAbsoluteY = null;
@Desc("How the top profile of the island is shaped. BIOME = evaluate target biome's own generators (mountains biome -> real mountains). NOISE = use topShapeStyle as a user-controlled heightmap. FLAT = constant maxTopHeight slab.")
private TopShapeMode topShapeMode = TopShapeMode.BIOME;
@MinNumber(0)
@MaxNumber(512)
@Desc("Maximum top profile height in blocks above the island base. Caps how tall the biome terrain can grow on top.")
private int maxTopHeight = 40;
@Desc("Used only when topShapeMode=NOISE. 2D noise driving the top heightmap. Set feature scale via the style's zoom field (small zoom = rugged peaks, large zoom = broad rolling shapes).")
private NoiseStyle topShapeStyle = DEFAULT_TOP_SHAPE_STYLE;
@MinNumber(0)
@MaxNumber(1)
@Desc("Amplitude multiplier applied to the NOISE top profile. 0 = no top (flat at base), 1 = full maxTopHeight range.")
private double topShapeAmp = 1.0;
@Desc("2D noise driving the bottom tail hanging below the island base. VASCULAR = drippy organic roots. FRACTAL_RM_SIMPLEX = crystalline spikes. CELLULAR = jagged chunks. PERLIN = smooth rounded bowl. SIMPLEX = gentle lobes. Set feature scale via the style's zoom field.")
private NoiseStyle bottomStyle = DEFAULT_BOTTOM_STYLE;
@MinNumber(0)
@MaxNumber(512)
@Desc("Minimum blocks below the base where the tail extends.")
private int bottomDepthMin = 4;
@MinNumber(0)
@MaxNumber(512)
@Desc("Maximum blocks below the base where the tail extends.")
private int bottomDepthMax = 20;
@MinNumber(0.1)
@MaxNumber(8)
@Desc("Power curve applied to the bottom noise before mapping to depth. >1 = most columns shallow with occasional deeper spikes (sparse roots). <1 = most columns deep with occasional shallow spots (dense curtains). 1.0 = linear.")
private double bottomExponent = 1.0;
@Desc("Controls the material palette near the island underside. DEPTH keeps the old top-down depth behavior. MIRROR_TOP uses the target biome's shallow/top palette from the underside upward. CUSTOM uses bottomPalette near the underside while keeping the target biome palette near the top.")
private FloatingBottomPaletteMode bottomPaletteMode = FloatingBottomPaletteMode.DEPTH;
@MinItems(1)
@Desc("Custom palette layers used near the underside when bottomPaletteMode=CUSTOM. The layer format is the same as normal biome layers.")
private List<IrisBiomePaletteLayer> bottomPalette = List.of();
@MinNumber(1)
@MaxNumber(512)
@Desc("Hard cap on the total Y-extent (top minus bottom) of a single island column. Safety limit.")
private int maxThickness = 96;
@Desc("Optional 3D noise that shifts the footprint's XZ sample position per Y layer — naturalizes the walls so they stop looking like a straight extrusion of the 2D footprint. Leave null to disable and keep straight vertical walls. Good defaults: {\"style\":\"SIMPLEX\",\"zoom\":0.25} for gentle undulation, {\"style\":\"FRACTAL_FBM_SIMPLEX\",\"zoom\":0.4} for craggier walls.")
private NoiseStyle wallWarpStyle;
@MinNumber(0)
@MaxNumber(64)
@Desc("Amplitude in blocks of the per-layer XZ shift applied when wallWarpStyle is set. 0 = no warp (straight walls). 4..8 = gentle naturalization. 16+ = heavily meandering walls. Ignored when wallWarpStyle is null.")
private double wallWarpAmplitude = 6.0;
@Desc("Optional 3D noise that swiss-cheeses the island interior by marking individual blocks as air when the noise exceeds carveThreshold. Leave null to keep the island solid. Good defaults: {\"style\":\"CELLULAR\",\"zoom\":0.3} for bubble pockets, {\"style\":\"VASCULAR\",\"zoom\":0.25} for wormy tunnels.")
private NoiseStyle carveStyle;
@Desc("Optional carving biome key or dimension carving entry id whose caveProfile drives floating-island internal air pockets. Dimension carving ids resolve first; biome keys such as carving/mushroom resolve second. When set, this overrides carveStyle while carveThreshold remains a final tuning bias.")
private String carving = "";
@MinNumber(0)
@MaxNumber(1)
@Desc("Threshold (0..1) above which carveStyle noise carves air pockets. 1.0 = no direct-noise carving. 0.75 = sparse pockets. 0.55 = heavy swiss-cheese. 0.4 = shredded lattice. When carving is set, lower values add a final positive threshold bias to the referenced caveProfile.")
private double carveThreshold = 1.0;
@Desc("Optional water surface height above the island base, in blocks. null = no internal water. Positive = water fills any dip in the top profile up to baseY + localFluidHeight (forms lakes/ponds in concavities of the biome-top heightmap).")
private Integer localFluidHeight = null;
@Desc("Block used for the internal water pool when localFluidHeight is positive.")
@Ref(Reference.BLOCK)
private String fluidBlock = "minecraft:water";
@Desc("When true, the target biome's decorators apply to the island's top surface.")
private boolean inheritDecorators = true;
@Desc("When true, the target biome's surface objects are placed on the island's top surface instead of the parent terrain.")
private boolean inheritObjects = true;
@MinNumber(0.01)
@MaxNumber(1)
@Desc("Uniform shrink factor applied to every object placed on this floating island (inherited, extra, and free-floating). 1.0 = native size, 0.5 = half size, 0.25 = quarter. Useful for making small floating biomes feel believable.")
private double objectShrinkFactor = 1.0;
@MinItems(1)
@Desc("Additional object placements anchored to the island top.")
private List<IrisObjectPlacement> extraObjects = List.of();
@MinItems(1)
@Desc("Additional object placements that float freely in air, independent of the island. Forced to ObjectPlaceMode.FLOATING.")
private List<IrisObjectPlacement> floatingObjects = List.of();
@Desc("Visualization color for this floating child in Iris Studio.")
private String color = null;
@Desc("Controls how topObjectOverrides are combined with the inherited surface objects from the target biome. INHERIT_ONLY (default) = behaves identically to before this field was added. MERGE = appends overrides after inherited objects. REPLACE = uses only overrides, ignoring all inherited objects.")
private OverrideMode topObjectMode = OverrideMode.INHERIT_ONLY;
@Desc("Controls how bottomObjectOverrides are combined. INHERIT_ONLY (default) = no bottom objects placed (there is no inherited bottom set). MERGE = same as REPLACE for bottom (no inherited source). REPLACE = uses bottomObjectOverrides list only.")
private OverrideMode bottomObjectMode = OverrideMode.INHERIT_ONLY;
@MinItems(1)
@Desc("Object placements that override or supplement the inherited surface objects on the island TOP. Behaviour depends on topObjectMode. INHERIT_ONLY = this list is ignored. MERGE = appended after inherited. REPLACE = used instead of inherited.")
private List<IrisObjectPlacement> topObjectOverrides = List.of();
@MinItems(1)
@Desc("Object placements anchored to the island BOTTOM face. Each entry is auto-inverted 180 degrees around the X axis and placed flush against the lowest solid face of the island, so objects appear to hang upside-down from the underside. WARNING: directional blocks (stairs, doors, slabs) will not render correctly when flipped — use non-directional content (logs, leaves, stone, mycelium, ice, glass) for bottom placements.")
private List<IrisObjectPlacement> bottomObjectOverrides = List.of();
public FloatingChildBiome() {
}
public String biome() {
return biome == null ? "" : biome;
}
public int rarity() {
return rarity;
}
public NoiseStyle footprintStyle() {
return footprintStyle == null ? DEFAULT_FOOTPRINT_STYLE : footprintStyle;
}
public double footprintThreshold() {
return footprintThreshold;
}
public int edgeTaperWidth() {
return edgeTaperWidth;
}
public double edgeTaperExponent() {
return edgeTaperExponent;
}
public NoiseStyle edgeTaperVariationStyle() {
return edgeTaperVariationStyle == null ? DEFAULT_EDGE_TAPER_VARIATION_STYLE : edgeTaperVariationStyle;
}
public double edgeTaperVariationAmplitude() {
return edgeTaperVariationAmplitude;
}
public NoiseStyle pickerStyle() {
return pickerStyle == null ? DEFAULT_PICKER_STYLE : pickerStyle;
}
public NoiseStyle altitudeStyle() {
return altitudeStyle == null ? DEFAULT_ALTITUDE_STYLE : altitudeStyle;
}
public int minHeightAboveSurface() {
return minHeightAboveSurface;
}
public int maxHeightAboveSurface() {
return maxHeightAboveSurface;
}
/** Empty where the pack sets none. */
public OptionalInt minAbsoluteY() {
return minAbsoluteY == null ? OptionalInt.empty() : OptionalInt.of(minAbsoluteY);
}
/** Empty where the pack sets none. */
public OptionalInt maxAbsoluteY() {
return maxAbsoluteY == null ? OptionalInt.empty() : OptionalInt.of(maxAbsoluteY);
}
public TopShapeMode topShapeMode() {
return topShapeMode == null ? TopShapeMode.BIOME : topShapeMode;
}
public int maxTopHeight() {
return maxTopHeight;
}
public NoiseStyle topShapeStyle() {
return topShapeStyle == null ? DEFAULT_TOP_SHAPE_STYLE : topShapeStyle;
}
public double topShapeAmp() {
return topShapeAmp;
}
public NoiseStyle bottomStyle() {
return bottomStyle == null ? DEFAULT_BOTTOM_STYLE : bottomStyle;
}
public int bottomDepthMin() {
return bottomDepthMin;
}
public int bottomDepthMax() {
return bottomDepthMax;
}
public double bottomExponent() {
return bottomExponent;
}
public FloatingBottomPaletteMode bottomPaletteMode() {
return bottomPaletteMode == null ? FloatingBottomPaletteMode.DEPTH : bottomPaletteMode;
}
public List<IrisBiomePaletteLayer> bottomPalette() {
return bottomPalette == null ? List.of() : Collections.unmodifiableList(bottomPalette);
}
public int maxThickness() {
return maxThickness;
}
/** Empty where the pack sets none. */
public Optional<NoiseStyle> wallWarpStyle() {
return Optional.ofNullable(wallWarpStyle);
}
public double wallWarpAmplitude() {
return wallWarpAmplitude;
}
/** Empty where the pack sets none. */
public Optional<NoiseStyle> carveStyle() {
return Optional.ofNullable(carveStyle);
}
public String carving() {
return carving == null ? "" : carving;
}
public double carveThreshold() {
return carveThreshold;
}
/** Empty where the pack sets none. */
public OptionalInt localFluidHeight() {
return localFluidHeight == null ? OptionalInt.empty() : OptionalInt.of(localFluidHeight);
}
public String fluidBlock() {
return fluidBlock == null ? "" : fluidBlock;
}
public boolean inheritDecorators() {
return inheritDecorators;
}
public boolean inheritObjects() {
return inheritObjects;
}
public double objectShrinkFactor() {
return objectShrinkFactor;
}
public List<IrisObjectPlacement> extraObjects() {
return extraObjects == null ? List.of() : Collections.unmodifiableList(extraObjects);
}
public List<IrisObjectPlacement> floatingObjects() {
return floatingObjects == null ? List.of() : Collections.unmodifiableList(floatingObjects);
}
public String color() {
return color == null ? "" : color;
}
public OverrideMode topObjectMode() {
return topObjectMode == null ? OverrideMode.INHERIT_ONLY : topObjectMode;
}
public OverrideMode bottomObjectMode() {
return bottomObjectMode == null ? OverrideMode.INHERIT_ONLY : bottomObjectMode;
}
public List<IrisObjectPlacement> topObjectOverrides() {
return topObjectOverrides == null ? List.of() : Collections.unmodifiableList(topObjectOverrides);
}
public List<IrisObjectPlacement> bottomObjectOverrides() {
return bottomObjectOverrides == null ? List.of() : Collections.unmodifiableList(bottomObjectOverrides);
}
}
@@ -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.floating;
import com.volmit.config.Desc;
@Desc("Controls how an override list is combined with the inherited object set from the target biome.")
public enum OverrideMode {
@Desc("Ignore the override list entirely. Use only the inherited objects from the target biome (subject to inheritObjects).")
INHERIT_ONLY,
@Desc("Append override list entries after the inherited objects from the target biome. Both sets are placed.")
MERGE,
@Desc("Use only the override list. The inherited objects from the target biome are discarded regardless of inheritObjects.")
REPLACE
}
@@ -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.floating;
import com.volmit.config.Desc;
@Desc("How the top profile of a floating-child island is shaped.")
public enum TopShapeMode {
@Desc("Evaluate the target biome's own terrain generators to build the island top. Mountains biome produces real peaks, desert produces dunes, plains is flat. Recommended default.")
BIOME,
@Desc("Drive the top profile from topShapeStyle noise, independent of the target biome's generators. Amplitude controlled by topShapeAmp.")
NOISE,
@Desc("Flat slab on top, topHeight blocks above the base. Ignores noise and biome generators.")
FLAT
}
@@ -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,132 @@
/*
* 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;
import java.util.Objects;
/** One axis of an object rotation, with the angles it may turn by and the steps between them. */
@Snippet("axis-rotation")
@Desc("Represents a rotation axis with intervals and maxes. The x and z axis values are defaulted to disabled. The Y axis defaults to on, rotating by 90 degree increments.")
public final class AxisRotationClamp {
private static final double FULL_TURN_DEGREES = 360D;
@Desc("Should this axis be rotated at all?")
private boolean enabled = false;
private transient boolean forceLock = false;
@Required
@MinNumber(-360)
@MaxNumber(360)
@Desc("The minimum angle (from) or set this and max to zero for any angle degrees. Set both to the same non-zero value to force it to that angle only")
private double min = 0;
@Required
@MinNumber(-360)
@MaxNumber(360)
@Desc("The maximum angle (to) or set this and min to zero for any angle degrees. Set both to the same non-zero value to force it to that angle only")
private double max = 0;
@Required
@MinNumber(0)
@MaxNumber(360)
@Desc("Iris spins the axis but not freely. For example an interval of 90 would mean 4 possible angles (right angles) degrees. \nSetting this to 0 means totally free rotation.\n\nNote that a lot of structures can have issues with non 90 degree intervals because the minecraft block resolution is so low.")
private double interval = 0;
public AxisRotationClamp() {
}
/** An axis turned as {@code enabled} says, by angles from {@code min} to {@code max} in steps of {@code interval}. */
public static AxisRotationClamp of(boolean enabled, boolean forceLock, double min, double max, double interval) {
AxisRotationClamp clamp = new AxisRotationClamp();
clamp.enabled = enabled;
clamp.forceLock = forceLock;
clamp.min = min;
clamp.max = max;
clamp.interval = interval;
return clamp;
}
/** An axis that turns to exactly {@code angle}, in steps of {@code interval}, whatever its min and max say. */
public static AxisRotationClamp locked(boolean enabled, double angle, double interval) {
return of(enabled, true, angle, angle, interval);
}
public boolean enabled() {
return enabled;
}
public double min() {
return min;
}
public double max() {
return max;
}
public double interval() {
return interval;
}
public boolean isUnlimited() {
return min == max && min == 0;
}
public boolean isLocked() {
return min == max && !isUnlimited();
}
public double getRadians(int rng) {
if (forceLock) {
return Math.toRadians(Math.ceil(Math.abs((max % FULL_TURN_DEGREES))));
}
if (isUnlimited()) {
double resolvedInterval = interval < 1 ? 1 : interval;
return Math.toRadians((resolvedInterval * (Math.ceil(Math.abs((rng % FULL_TURN_DEGREES) / resolvedInterval)))) % FULL_TURN_DEGREES);
}
if (min == max && min != 0) {
return Math.toRadians(max);
}
double angle = (interval * (Math.ceil(Math.abs((rng % FULL_TURN_DEGREES) / interval)))) % FULL_TURN_DEGREES;
return Math.toRadians(Math.min(Math.max(min, max), Math.max(Math.min(min, max), angle)));
}
@Override
public boolean equals(Object other) {
return other instanceof AxisRotationClamp clamp
&& enabled == clamp.enabled
&& Double.compare(min, clamp.min) == 0
&& Double.compare(max, clamp.max) == 0
&& Double.compare(interval, clamp.interval) == 0;
}
@Override
public int hashCode() {
return Objects.hash(enabled, min, max, interval);
}
}
@@ -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;
}
}
@@ -0,0 +1,66 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <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.Snippet;
/** The terrain slopes a placement or decorator may sit on, written as its {@code slopeCondition}. */
@Snippet("slope-clip")
@Desc("Limits placement to a minimum and maximum terrain slope")
public final class SlopeClip {
private static final double DEFAULT_MINIMUM_SLOPE = 0;
private static final double DEFAULT_MAXIMUM_SLOPE = 10;
@MinNumber(0)
@MaxNumber(1024)
@Desc("The minimum slope for placement")
private double minimumSlope = DEFAULT_MINIMUM_SLOPE;
@MinNumber(0)
@MaxNumber(1024)
@Desc("The maximum slope for placement")
private double maximumSlope = DEFAULT_MAXIMUM_SLOPE;
public SlopeClip() {
}
public double minimumSlope() {
return minimumSlope;
}
public double maximumSlope() {
return maximumSlope;
}
/** Whether every slope passes. */
public boolean isDefault() {
return minimumSlope <= 0 && maximumSlope >= DEFAULT_MAXIMUM_SLOPE;
}
public boolean isValid(double slope) {
if (isDefault()) {
return true;
}
return !(minimumSlope > slope) && !(maximumSlope < slope);
}
}
@@ -0,0 +1,90 @@
/*
* 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.stilt;
import com.volmit.block.PaletteSpec;
import com.volmit.config.Desc;
import com.volmit.config.MaxNumber;
import com.volmit.config.MinNumber;
import com.volmit.config.Snippet;
import java.util.Optional;
/** How far and with which blocks an object stilts into the ground, written as the placement's {@code stiltSettings}. */
@Snippet("stilt-settings")
@Desc("Defines stilting behaviour.")
public final class StiltSettings {
@MinNumber(0)
@MaxNumber(64)
@Desc("Defines the maximum amount of blocks the object stilts verticially before overstilting and randomRange.")
private int yMax;
@MinNumber(0)
@MaxNumber(64)
@Desc("Defines the upper boundary for additional blocks after overstilting and/or maxStiltRange.")
private int yRand;
@MaxNumber(64)
@MinNumber(0)
@Desc("If the place mode is set to stilt, you can over-stilt it even further into the ground. Especially useful when using fast stilt due to inaccuracies.")
private int overStilt;
@Desc("If defined, stilting will be done using this block palette rather than the last layer of the object.")
private PaletteSpec palette;
@MinNumber(1)
@MaxNumber(256)
@Desc("For ORGANIC_STILT / CEILING_HANG: the maximum number of blocks to scan toward the cave floor (or ceiling) looking for solid ground before giving up.")
private int organicMaxScan = 48;
@MinNumber(0)
@MaxNumber(32)
@Desc("For ORGANIC_STILT / CEILING_HANG: the maximum number of blocks each column's stilt is randomly shortened by, giving the underside a ragged organic edge instead of a flat disc.")
private int organicJitter = 3;
@MinNumber(0)
@MaxNumber(1)
@Desc("For ORGANIC_STILT / CEILING_HANG: in the deepest fraction of each stilt column, blocks are randomly skipped to break the tip up. Higher = more broken and scratchy. 0 disables.")
private double organicScratch = 0.55;
public StiltSettings() {
}
public int yMax() {
return yMax;
}
public int yRand() {
return yRand;
}
public int overStilt() {
return overStilt;
}
public Optional<PaletteSpec> palette() {
return Optional.ofNullable(palette);
}
public int organicMaxScan() {
return organicMaxScan;
}
public int organicJitter() {
return organicJitter;
}
public double organicScratch() {
return organicScratch;
}
}
@@ -0,0 +1,73 @@
/*
* 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.vacuum;
import com.volmit.config.Desc;
import com.volmit.config.MaxNumber;
import com.volmit.config.MinNumber;
import com.volmit.config.Snippet;
/** How a VACUUM place mode bends terrain to meet an object's base, written as the placement's {@code vacuumSettings}. */
@Snippet("vacuum-settings")
@Desc("Defines how a VACUUM place mode bends terrain to meet an object's base.")
public final class VacuumSettings {
@MinNumber(0)
@MaxNumber(128)
@Desc("The horizontal radius (in blocks) the terrain deformation extends beyond the object footprint before it blends back to the natural surface. 0 = derive automatically from the place mode (VACUUM, VACUUM_HIGH larger, VACUUM_FAST smaller).")
private int radius = 0;
@MinNumber(0.25)
@MaxNumber(8)
@Desc("The falloff exponent controlling how the deformation eases out across the radius. 1 = linear (cone), 2 = parabolic (default, gentle bowl), higher = flatter near the object with a sharper drop at the edge.")
private double falloff = 2.0;
@MinNumber(0)
@MaxNumber(64)
@Desc("For VACUUM_ORGANIC: the maximum number of blocks the effective radius is randomly perturbed per column, giving the meeting edge an irregular organic outline instead of a clean circle.")
private int organicJitter = 4;
@MinNumber(0)
@MaxNumber(64)
@Desc("For VACUUM_WAVY: the vertical amplitude (in blocks) of the rolling simplex wave applied across the terrain bend. The wave fades to zero under the object (so it stays flush) and at the outer radius (so it blends back to the surface), peaking across the mid-slope. 0 disables the wave.")
private int waveAmplitude = 3;
@MinNumber(0.1)
@MaxNumber(64)
@Desc("For VACUUM_WAVY: the frequency of the simplex wave. Higher values make tighter, choppier ripples; lower values make broad, gentle swells. The wavelength in blocks is roughly 100 / waveScale.")
private double waveScale = 5.0;
public VacuumSettings() {
}
public int radius() {
return radius;
}
public double falloff() {
return falloff;
}
public int organicJitter() {
return organicJitter;
}
public int waveAmplitude() {
return waveAmplitude;
}
public double waveScale() {
return waveScale;
}
}
@@ -0,0 +1,55 @@
/*
* 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.validate;
import com.volmit.config.Desc;
import com.volmit.config.MaxNumber;
import com.volmit.config.MinNumber;
import com.volmit.config.Snippet;
/** The heights an object placement may sit between, written as the placement's {@code clamp}. */
@Snippet("object-limit")
@Desc("Limits object placement by minimum and maximum world height")
public final class ObjectLimit {
@MinNumber(-2048)
@MaxNumber(2048)
@Desc("The minimum height for placement (bottom of object)")
private int minimumHeight = -2048;
@MinNumber(-2048)
@MaxNumber(2048)
@Desc("The maximum height for placement (top of object)")
private int maximumHeight = 2048;
public ObjectLimit() {
}
public int minimumHeight() {
return minimumHeight;
}
public int maximumHeight() {
return maximumHeight;
}
/** Whether an object whose top is at {@code highest} and bottom at {@code lowest} fits between the limits. */
public boolean canPlace(int highest, int lowest) {
return highest <= maximumHeight && lowest >= minimumHeight;
}
}