diff --git a/src/main/java/art/arcane/iris/builtin/loot/ObjectLoot.java b/src/main/java/art/arcane/iris/builtin/loot/ObjectLoot.java
new file mode 100644
index 000000000..95ca8dae0
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/loot/ObjectLoot.java
@@ -0,0 +1,76 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.builtin.loot;
+
+import com.volmit.block.BlockSpec;
+import com.volmit.config.Desc;
+import com.volmit.config.MinItems;
+import com.volmit.config.MinNumber;
+import com.volmit.config.Required;
+import com.volmit.config.ResourceRef;
+import com.volmit.config.Snippet;
+
+import java.util.Collections;
+import java.util.List;
+
+@Snippet("object-loot")
+@Desc("Represents loot within this object")
+public final class ObjectLoot implements ObjectLootEntry {
+ @MinItems(1)
+ @Desc("The list of blocks this loot table should apply to")
+ private List filter = List.of();
+ @Desc("Exactly match the block data or not")
+ private boolean exact = false;
+ @Desc("The loot table name")
+ @Required
+ @ResourceRef(LootTable.class)
+ private String name;
+ @Desc("The weight of this loot table being chosen")
+ @MinNumber(1)
+ private int weight = 1;
+
+ public ObjectLoot() {
+ }
+
+ /** A table for every container of the placement. */
+ public ObjectLoot(String name, int weight) {
+ this.name = name;
+ this.weight = weight;
+ }
+
+ @Override
+ public String name() {
+ return name;
+ }
+
+ @Override
+ public int weight() {
+ return weight;
+ }
+
+ @Override
+ public boolean exact() {
+ return exact;
+ }
+
+ @Override
+ public List filter() {
+ return filter == null ? List.of() : Collections.unmodifiableList(filter);
+ }
+}
diff --git a/src/main/java/art/arcane/iris/builtin/loot/ObjectLootEntry.java b/src/main/java/art/arcane/iris/builtin/loot/ObjectLootEntry.java
new file mode 100644
index 000000000..92a2a5d77
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/loot/ObjectLootEntry.java
@@ -0,0 +1,41 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.builtin.loot;
+
+import com.volmit.block.BlockSpec;
+
+import java.util.List;
+
+/**
+ * One loot table an object placement gives its containers: which table, how often it is picked among the placement's
+ * tables, and which of the object's containers it is for.
+ */
+public interface ObjectLootEntry {
+ /** The table: a key of the pack's loot tables, or a key of the platform's. */
+ String name();
+
+ /** How often the table is picked among equals; a table with no weight is never picked. */
+ int weight();
+
+ /** Whether the table applies to the exact state of the blocks in {@link #filter}, not to every state of their kind of block. */
+ boolean exact();
+
+ /** The blocks the table is for; none means every container the placement holds. */
+ List filter();
+}
diff --git a/src/main/java/art/arcane/iris/builtin/loot/ObjectVanillaLoot.java b/src/main/java/art/arcane/iris/builtin/loot/ObjectVanillaLoot.java
new file mode 100644
index 000000000..45351c4d1
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/loot/ObjectVanillaLoot.java
@@ -0,0 +1,71 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.builtin.loot;
+
+import com.volmit.block.BlockSpec;
+import com.volmit.config.Desc;
+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 com.volmit.config.Snippet;
+
+import java.util.Collections;
+import java.util.List;
+
+@Snippet("object-vanilla-loot")
+@Desc("Represents vanilla loot within this object")
+public final class ObjectVanillaLoot implements ObjectLootEntry {
+ @MinItems(1)
+ @Desc("The list of blocks this loot table should apply to")
+ private List filter = List.of();
+ @Desc("Exactly match the block data or not")
+ private boolean exact = false;
+ @Desc("The vanilla loot table key")
+ @Required
+ @Ref(Reference.LOOT_TABLE)
+ private String name;
+ @Desc("The weight of this loot table being chosen")
+ @MinNumber(1)
+ private int weight = 1;
+
+ public ObjectVanillaLoot() {
+ }
+
+ @Override
+ public String name() {
+ return name;
+ }
+
+ @Override
+ public int weight() {
+ return weight;
+ }
+
+ @Override
+ public boolean exact() {
+ return exact;
+ }
+
+ @Override
+ public List filter() {
+ return filter == null ? List.of() : Collections.unmodifiableList(filter);
+ }
+}
diff --git a/src/main/java/art/arcane/iris/builtin/objects/HeightmapNoise.java b/src/main/java/art/arcane/iris/builtin/objects/HeightmapNoise.java
new file mode 100644
index 000000000..2c1c85628
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/objects/HeightmapNoise.java
@@ -0,0 +1,136 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.builtin.objects;
+
+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 com.volmit.noise.NoiseStyle;
+
+import java.util.Collections;
+import java.util.List;
+
+/** The virtual heightmap an object placement may sit on instead of the terrain, written as the placement's {@code heightmap}. */
+@Snippet("generator")
+@Desc("A noise generator")
+public final class HeightmapNoise {
+ @MinNumber(0.0001)
+ @Desc("The coordinate input zoom")
+ private double zoom = 1;
+ @Desc("Reverse the output. So that noise = -noise + opacity")
+ private boolean negative = false;
+ @MinNumber(0)
+ @MaxNumber(1)
+ @Desc("The output multiplier")
+ private double opacity = 1;
+ @Desc("Coordinate offset x")
+ private double offsetX = 0;
+ @Desc("Height output offset y. Avoid using with terrain generation.")
+ private double offsetY = 0;
+ @Desc("Coordinate offset z")
+ private double offsetZ = 0;
+ @Required
+ @Desc("The seed")
+ private long seed = 0;
+ @Desc("Apply a parametric curve on the output")
+ private boolean parametric = false;
+ @Desc("Apply a bezier curve on the output")
+ private boolean bezier = false;
+ @Desc("Apply a sin-center curve on the output (0, and 1 = 0 and 0.5 = 1.0 using a sinoid shape.)")
+ private boolean sinCentered = false;
+ @Desc("The exponent noise^EXPONENT")
+ private double exponent = 1;
+ @Desc("Enable / disable. Outputs offsetY if disabled")
+ private boolean enabled = true;
+ @Required
+ @Desc("The Noise Style")
+ private NoiseStyle style = NoiseStyle.of("IRIS");
+ @MinNumber(1)
+ @Desc("Multiple octaves for multple generators of changing zooms added together")
+ private int octaves = 1;
+ @MinItems(1)
+ @Desc("Apply a child noise generator to fracture the input coordinates of this generator")
+ private List fracture = List.of();
+
+ public HeightmapNoise() {
+ }
+
+ public double zoom() {
+ return zoom;
+ }
+
+ public boolean negative() {
+ return negative;
+ }
+
+ public double opacity() {
+ return opacity;
+ }
+
+ public double offsetX() {
+ return offsetX;
+ }
+
+ public double offsetY() {
+ return offsetY;
+ }
+
+ public double offsetZ() {
+ return offsetZ;
+ }
+
+ public long seed() {
+ return seed;
+ }
+
+ public boolean parametric() {
+ return parametric;
+ }
+
+ public boolean bezier() {
+ return bezier;
+ }
+
+ public boolean sinCentered() {
+ return sinCentered;
+ }
+
+ public double exponent() {
+ return exponent;
+ }
+
+ public boolean enabled() {
+ return enabled;
+ }
+
+ public NoiseStyle style() {
+ return style;
+ }
+
+ public int octaves() {
+ return octaves;
+ }
+
+ public List fracture() {
+ return fracture == null ? List.of() : Collections.unmodifiableList(fracture);
+ }
+}
diff --git a/src/main/java/art/arcane/iris/builtin/objects/ObjectPlacement.java b/src/main/java/art/arcane/iris/builtin/objects/ObjectPlacement.java
new file mode 100644
index 000000000..d0fc5c6e4
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/objects/ObjectPlacement.java
@@ -0,0 +1,315 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.builtin.objects;
+
+import art.arcane.iris.builtin.anchor.ObjectPlaceMode;
+import art.arcane.iris.builtin.blocks.ObjectReplace;
+import art.arcane.iris.builtin.carve.CarvingMode;
+import art.arcane.iris.builtin.carve.CaveAnchorMode;
+import art.arcane.iris.builtin.loot.ObjectLoot;
+import art.arcane.iris.builtin.loot.ObjectVanillaLoot;
+import art.arcane.iris.builtin.prepare.ObjectRotation;
+import art.arcane.iris.builtin.prepare.ObjectTranslate;
+import art.arcane.iris.builtin.prepare.SlopeClip;
+import art.arcane.iris.builtin.spawn.PlacementMarker;
+import art.arcane.iris.builtin.stilt.StiltSettings;
+import art.arcane.iris.builtin.vacuum.VacuumSettings;
+import art.arcane.iris.builtin.validate.ObjectLimit;
+import com.google.gson.Gson;
+import com.google.gson.JsonElement;
+import com.google.gson.TypeAdapter;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+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.Required;
+import com.volmit.config.Snippet;
+import com.volmit.noise.NoiseStyle;
+import com.volmit.noise.StyledRange;
+
+import java.io.IOException;
+import java.util.Collections;
+import java.util.List;
+import java.util.Optional;
+
+/**
+ * One object placement of a biome or region, an entry of its {@code objects}: which objects, how often, and how they sit
+ * in the world. {@code iris:objects} decides from the options it owns (what to place, chance, density, carving and
+ * surface support); Iris's placement stages read the rest from the placement itself, so this keeps the JSON the placement
+ * was written as ({@link #json()}) for Iris to read it again the way it reads placements everywhere else.
+ */
+@Snippet("object-placer")
+@Desc("Represents an iris object placer. It places objects.")
+@JsonAdapter(ObjectPlacement.KeepingItsJson.class)
+public final class ObjectPlacement {
+ private static final int DEFAULT_SURFACE_SUPPORT_BUFFER = 2;
+ private static final int DEFAULT_SURFACE_SUPPORT_DEPTH = 2;
+
+ @Required
+ @MinItems(1)
+ @Ref(Reference.PACK_OBJECT)
+ @Desc("List of objects to place")
+ private List place = List.of();
+ @Desc("Rotate this objects placement")
+ private ObjectRotation rotation = new ObjectRotation();
+ @Desc("Limit the max height or min height of placement.")
+ private ObjectLimit clamp = new ObjectLimit();
+ @MinNumber(0)
+ @MaxNumber(1)
+ @Desc("The maximum layer level of a snow filter overtop of this placement. Set to 0 to disable. Max of 1.")
+ private double snow = 0;
+ @Desc("Whether or not this object can be targeted by a dolphin.")
+ private boolean isDolphinTarget = false;
+ @Desc("The slope at which this object can be placed. Range from 0 to 10 by default. Calculated from a 3-block radius from the center of the object placement.")
+ private SlopeClip slopeCondition = new SlopeClip();
+ @Desc("Set to true to add the rotation of the direction of the slope of the terrain (wherever the slope is going down) to the y-axis rotation of the object." +
+ "Rounded to 90 degrees. Adds the *min* rotation of the y axis as well (to still allow you to rotate objects nicely). Discards *max* and *interval* on *yaxis*")
+ private boolean rotateTowardsSlope = false;
+ @MinNumber(0)
+ @MaxNumber(1)
+ @Desc("The chance for this to place in a chunk. If you need multiple per chunk, set this to 1 and use density.")
+ private double chance = 1;
+ @MinNumber(1)
+ @Desc("If the chance check passes, place this many in a single chunk")
+ private int density = 1;
+ @Desc("If the chance check passes, and you specify this, it picks a number in the range based on noise, and 'density' is ignored.")
+ private StyledRange densityStyle = null;
+ @Desc("When stilting is enabled, this object will define various properties related to it.")
+ private StiltSettings stiltSettings;
+ @Desc("When a VACUUM place mode is used, this defines the deformation radius and falloff.")
+ private VacuumSettings vacuumSettings;
+ @MaxNumber(64)
+ @MinNumber(0)
+ @Desc("When bore is enabled, expand max-y of the cuboid it removes")
+ private int boreExtendMaxY = 0;
+ @MinItems(1)
+ @Desc("Add markers to blocks in this object")
+ private List markers = List.of();
+ @MaxNumber(64)
+ @MinNumber(-1)
+ @Desc("When bore is enabled, lower min-y of the cuboid it removes")
+ private int boreExtendMinY = 0;
+ @Desc("If set to true, objects will place on the terrain height, ignoring the water surface.")
+ private boolean underwater = false;
+ @Desc("If set to true, objects will place in carvings (such as underground) or under an overhang.")
+ private CarvingMode carvingSupport = CarvingMode.SURFACE_ONLY;
+ @MinNumber(0)
+ @MaxNumber(16)
+ @Desc("Extra buffer, in blocks, around this object's base footprint that must also be solid, un-carved ground. 0 checks only the footprint itself.")
+ private int surfaceSupportBuffer = DEFAULT_SURFACE_SUPPORT_BUFFER;
+ @MinNumber(1)
+ @MaxNumber(16)
+ @Desc("Minimum thickness, in blocks, of un-carved ground required under every column of this object's base footprint.")
+ private int surfaceSupportDepth = DEFAULT_SURFACE_SUPPORT_DEPTH;
+ @Desc("Set to false to let this placement sit over carved surface openings such as cave entrances.")
+ private boolean requireSurfaceSupport = true;
+ @Desc("When carving placement is enabled, select which carved-space anchor this placement targets.")
+ private CaveAnchorMode caveAnchorMode = CaveAnchorMode.PROFILE_DEFAULT;
+ @Desc("If this is defined, this object wont place on the terrain heightmap, but instead on this virtual heightmap")
+ private HeightmapNoise heightmap;
+ @Desc("If set to true, Iris will try to fill the insides of 'rooms' and 'pockets' where air should fit based off of raytrace checks. This prevents a village house placing in an area where a tree already exists, and instead replaces the parts of the tree where the interior of the structure is. \n\nThis operation does not affect warmed-up generation speed however it does slow down loading objects.")
+ private boolean smartBore = false;
+ @Desc("If set to true, Blocks placed underwater that could be waterlogged are waterlogged.")
+ private boolean waterloggable = false;
+ @Desc("If set to true, objects will place on the fluid height level Such as boats.")
+ private boolean onwater = false;
+ @Desc("If set to true, this object will only place parts of itself where blocks already exist. Warning: Melding is very performance intensive!")
+ private boolean meld = false;
+ @Desc("If set to true, this object will get placed from the bottom of the world up")
+ private boolean fromBottom;
+ @Desc("If set to true, this object will place from the ground up instead of height checks when not y locked to the surface. This is not compatable with X and Z axis rotations (it may look off)")
+ private boolean bottom = false;
+ @Desc("If set to true, air will be placed before the schematic places.")
+ private boolean bore = false;
+ @Desc("Use a generator to warp the field of coordinates. Using simplex for example would make a square placement warp like a flag")
+ private NoiseStyle warp = NoiseStyle.of(NoiseStyle.FLAT);
+ @Desc("The placement mode")
+ private ObjectPlaceMode mode = ObjectPlaceMode.CENTER_HEIGHT;
+ @MinItems(1)
+ @Desc("Find and replace blocks")
+ private List edit = List.of();
+ @Desc("Translate this object's placement")
+ private ObjectTranslate translate = new ObjectTranslate();
+ @Desc("Scale Objects")
+ private ObjectScale scale = new ObjectScale();
+ @MinItems(1)
+ @Desc("The loot tables to apply to these objects")
+ private List loot = List.of();
+ @MinItems(1)
+ @Desc("The vanilla loot tables to apply to these objects")
+ private List vanillaLoot = List.of();
+ @Desc("Whether the given loot tables override any and all other loot tables available in the dimension, region or biome.")
+ private boolean overrideGlobalLoot = false;
+ @MinItems(1)
+ @Desc("This object / these objects override the following trees when they grow...")
+ private List trees = List.of();
+ @MinItems(1)
+ @Ref(Reference.PACK_OBJECT)
+ @Desc("List of objects to this object is allowed to collied with")
+ private List allowedCollisions = List.of();
+ @MinItems(1)
+ @Ref(Reference.PACK_OBJECT)
+ @Desc("List of objects to this object is forbidden to collied with")
+ private List forbiddenCollisions = List.of();
+ @Desc("Ignore any placement restrictions for this object")
+ @SerializedName(value = "forcePlace", alternate = {"force"})
+ private boolean forcePlace = false;
+
+ private transient volatile String json;
+ private transient volatile Object hostForm;
+
+ public ObjectPlacement() {
+ }
+
+ /** The objects to pick from, by the keys of the pack's objects. */
+ public List place() {
+ return place == null ? List.of() : Collections.unmodifiableList(place);
+ }
+
+ public double chance() {
+ return chance;
+ }
+
+ /** The count of placements when the chance check passes, unless {@link #densityStyle()} picks it. */
+ public int density() {
+ return density;
+ }
+
+ public Optional densityStyle() {
+ return Optional.ofNullable(densityStyle);
+ }
+
+ /** The fixed density, or, when a style picks the count, the middle of its range. */
+ public int middleDensity() {
+ if (densityStyle == null) {
+ return density;
+ }
+ return (int) ((densityStyle.max() + densityStyle.min()) / 2);
+ }
+
+ public ObjectRotation rotation() {
+ return rotation;
+ }
+
+ public ObjectTranslate translate() {
+ return translate;
+ }
+
+ public ObjectScale scale() {
+ return scale;
+ }
+
+ public NoiseStyle warp() {
+ return warp;
+ }
+
+ public ObjectPlaceMode mode() {
+ return mode;
+ }
+
+ public Optional vacuumSettings() {
+ return Optional.ofNullable(vacuumSettings);
+ }
+
+ public CarvingMode carvingSupport() {
+ return carvingSupport;
+ }
+
+ public CaveAnchorMode caveAnchorMode() {
+ return caveAnchorMode;
+ }
+
+ public boolean underwater() {
+ return underwater;
+ }
+
+ public boolean isDolphinTarget() {
+ return isDolphinTarget;
+ }
+
+ public boolean forcePlace() {
+ return forcePlace;
+ }
+
+ public boolean requireSurfaceSupport() {
+ return requireSurfaceSupport;
+ }
+
+ public int surfaceSupportBuffer() {
+ return surfaceSupportBuffer;
+ }
+
+ public List trees() {
+ return trees == null ? List.of() : Collections.unmodifiableList(trees);
+ }
+
+ /** The JSON this placement was read from, which Iris reads again as its own placement; null for one made in code. */
+ public String json() {
+ return json;
+ }
+
+ /**
+ * What Iris made of {@link #json()} the last time it asked, kept here so it asks once. Only Iris sets or reads it,
+ * and it is its own type.
+ */
+ public Object hostForm() {
+ return hostForm;
+ }
+
+ public void hostForm(Object form) {
+ this.hostForm = form;
+ }
+
+ /** Reads a placement like any settings and keeps the JSON it was read from. */
+ public static final class KeepingItsJson implements TypeAdapterFactory {
+ @Override
+ @SuppressWarnings("unchecked") // The type is checked to be ObjectPlacement.
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (type.getRawType() != ObjectPlacement.class) {
+ return null;
+ }
+ TypeAdapter placements = gson.getDelegateAdapter(this, TypeToken.get(ObjectPlacement.class));
+ TypeAdapter elements = gson.getAdapter(JsonElement.class);
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, ObjectPlacement placement) throws IOException {
+ placements.write(out, placement);
+ }
+
+ @Override
+ public ObjectPlacement read(JsonReader in) throws IOException {
+ JsonElement written = elements.read(in);
+ ObjectPlacement placement = placements.fromJsonTree(written);
+ if (placement != null) {
+ placement.json = written.toString();
+ }
+ return placement;
+ }
+ }.nullSafe();
+ }
+ }
+}
diff --git a/src/main/java/art/arcane/iris/builtin/objects/ObjectScale.java b/src/main/java/art/arcane/iris/builtin/objects/ObjectScale.java
new file mode 100644
index 000000000..2390f0654
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/objects/ObjectScale.java
@@ -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 .
+ */
+
+package art.arcane.iris.builtin.objects;
+
+import com.volmit.config.Desc;
+import com.volmit.config.MaxNumber;
+import com.volmit.config.MinNumber;
+import com.volmit.config.Snippet;
+
+/** How an object placement scales its objects, written as the placement's {@code scale}. */
+@Snippet("object-scale")
+@Desc("Scale Objects")
+public final class ObjectScale {
+ private static final double NO_SCALE = 1;
+
+ @MinNumber(0.01)
+ @MaxNumber(50)
+ @Desc("Fixed scale multiplier for this object. 0.5 shrinks to half size, 2.0 doubles the size. When set to anything other than 1, this overrides minimumScale and maximumScale. Leave at 1 to use the minimumScale/maximumScale range.")
+ private double size = NO_SCALE;
+
+ @MinNumber(1)
+ @MaxNumber(32)
+ @Desc("Iris Objects are scaled and cached to speed up placements. Because of this extra memory is used, so we evenly distribute variations across the defined scale range, then pick one randomly. If the differences is small, use a lower number. For more possibilities on the scale spectrum, increase this at the cost of memory.")
+ private int variations = 7;
+
+ @MinNumber(0.01)
+ @MaxNumber(50)
+ @Desc("The minimum scale. Used when size is 1 to pick a random scale per placement.")
+ private double minimumScale = NO_SCALE;
+
+ @MinNumber(0.01)
+ @MaxNumber(50)
+ @Desc("The maximum scale. Used when size is 1 to pick a random scale per placement.")
+ private double maximumScale = NO_SCALE;
+
+ @Desc("If this object is scaled up beyond its origin size, specify a 3D interpolator. NONE keeps blocky scaled output, TRILINEAR (LERP) smooths with linear interpolation, TRICUBIC and TRIHERMITE produce smoother but slower output.")
+ private ScaleInterpolation interpolation = ScaleInterpolation.NONE;
+
+ public ObjectScale() {
+ }
+
+ public double size() {
+ return size;
+ }
+
+ public int variations() {
+ return variations;
+ }
+
+ public double minimumScale() {
+ return minimumScale;
+ }
+
+ public double maximumScale() {
+ return maximumScale;
+ }
+
+ public ScaleInterpolation interpolation() {
+ return interpolation == null ? ScaleInterpolation.NONE : interpolation;
+ }
+
+ /** The largest factor this scale makes an object, which a placement's reach has to cover. */
+ public double maxScale() {
+ if (size != NO_SCALE) {
+ return size;
+ }
+ return Math.max(minimumScale, maximumScale);
+ }
+}
diff --git a/src/main/java/art/arcane/iris/builtin/objects/ObjectSettings.java b/src/main/java/art/arcane/iris/builtin/objects/ObjectSettings.java
new file mode 100644
index 000000000..c1b7484c1
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/objects/ObjectSettings.java
@@ -0,0 +1,47 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.builtin.objects;
+
+import com.volmit.FeatureAttachment.Target;
+import com.volmit.IrisFeature;
+import com.volmit.config.Desc;
+import com.volmit.config.Feature;
+import com.volmit.config.MinItems;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * The object placements a region or biome declares, written as {@code "objects": [...]}, the list of placements. A chunk
+ * places those of its centre column's region and of that column's biome, and of the cave biome where it places in caves.
+ */
+@Desc("Objects define what schematics (iob files) iris will place here")
+@Feature(id = "iris:objects", name = "Objects", key = "objects", root = "objects", targets = {Target.REGION, Target.BIOME})
+public final class ObjectSettings implements IrisFeature {
+ @MinItems(1)
+ @Desc("Objects define what schematics (iob files) iris will place here")
+ private List objects = List.of();
+
+ public ObjectSettings() {
+ }
+
+ public List objects() {
+ return objects == null ? List.of() : Collections.unmodifiableList(objects);
+ }
+}
diff --git a/src/main/java/art/arcane/iris/builtin/objects/ProceduralObjectSettings.java b/src/main/java/art/arcane/iris/builtin/objects/ProceduralObjectSettings.java
new file mode 100644
index 000000000..a23f89b5c
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/objects/ProceduralObjectSettings.java
@@ -0,0 +1,99 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.builtin.objects;
+
+import art.arcane.iris.builtin.objects.coral.Coral;
+import art.arcane.iris.builtin.objects.crystal.Crystal;
+import art.arcane.iris.builtin.objects.formation.Formation;
+import art.arcane.iris.builtin.objects.fungi.Fungus;
+import art.arcane.iris.builtin.objects.ruin.Ruin;
+import art.arcane.iris.builtin.objects.tree.Tree;
+import com.volmit.FeatureAttachment.Target;
+import com.volmit.IrisFeature;
+import com.volmit.config.Desc;
+import com.volmit.config.Feature;
+import com.volmit.config.MinItems;
+import com.volmit.config.Snippet;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * The procedural objects a region or biome declares, written as {@code "proceduralObjects": {"trees": [...], ...}}: things
+ * Iris generates from scratch at world-gen time and places like object placements.
+ */
+@Snippet("procedural-objects")
+@Desc("Procedurally generated objects placed in a biome or region. Unlike the objects block (which loads iob files), these are generated from scratch at world-gen time.")
+@Feature(id = "iris:objects/procedural", name = "Procedural objects", key = "proceduralObjects", targets = {Target.REGION, Target.BIOME})
+public final class ProceduralObjectSettings implements IrisFeature {
+ @MinItems(1)
+ @Desc("Procedurally generated trees.")
+ private List trees = List.of();
+
+ @MinItems(1)
+ @Desc("Procedurally generated ruins (crumbling pillars, walls, arches, rubble).")
+ private List ruins = List.of();
+
+ @MinItems(1)
+ @Desc("Procedurally generated natural rock formations (spires, hoodoos, arches, sea stacks, boulders, basalt columns).")
+ private List formations = List.of();
+
+ @MinItems(1)
+ @Desc("Procedurally generated underwater coral structures.")
+ private List coral = List.of();
+
+ @MinItems(1)
+ @Desc("Procedurally generated mushrooms and shelf fungi.")
+ private List fungi = List.of();
+
+ @MinItems(1)
+ @Desc("Procedurally generated crystal clusters (usually placed in caves).")
+ private List crystals = List.of();
+
+ public ProceduralObjectSettings() {
+ }
+
+ public List trees() {
+ return view(trees);
+ }
+
+ public List ruins() {
+ return view(ruins);
+ }
+
+ public List formations() {
+ return view(formations);
+ }
+
+ public List coral() {
+ return view(coral);
+ }
+
+ public List fungi() {
+ return view(fungi);
+ }
+
+ public List crystals() {
+ return view(crystals);
+ }
+
+ private static List view(List list) {
+ return list == null ? List.of() : Collections.unmodifiableList(list);
+ }
+}
diff --git a/src/main/java/art/arcane/iris/builtin/objects/RequireSurfaceSupportSettings.java b/src/main/java/art/arcane/iris/builtin/objects/RequireSurfaceSupportSettings.java
new file mode 100644
index 000000000..684951af1
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/objects/RequireSurfaceSupportSettings.java
@@ -0,0 +1,41 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.builtin.objects;
+
+import com.volmit.FeatureAttachment.Target;
+import com.volmit.IrisFeature;
+import com.volmit.config.Desc;
+import com.volmit.config.Feature;
+
+/** Whether a dimension refuses surface objects over carved openings, written as {@code "requireObjectSurfaceSupport": true}. */
+@Desc("Refuse to place surface objects and trees over carved surface openings.")
+@Feature(id = "iris:objects/surface-support", name = "Require surface support", key = "requireObjectSurfaceSupport", root = "require", targets = Target.DIMENSION)
+public final class RequireSurfaceSupportSettings implements IrisFeature {
+ private static final boolean DEFAULT_REQUIRED = true;
+
+ @Desc("Refuse to place surface objects and trees over carved surface openings.")
+ private boolean require = DEFAULT_REQUIRED;
+
+ public RequireSurfaceSupportSettings() {
+ }
+
+ public boolean require() {
+ return require;
+ }
+}
diff --git a/src/main/java/art/arcane/iris/builtin/objects/ScaleInterpolation.java b/src/main/java/art/arcane/iris/builtin/objects/ScaleInterpolation.java
new file mode 100644
index 000000000..077e3e80e
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/objects/ScaleInterpolation.java
@@ -0,0 +1,33 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.builtin.objects;
+
+import com.volmit.config.Desc;
+
+@Desc("Use 3D Interpolation on scaled objects if they are larger than the origin.")
+public enum ScaleInterpolation {
+ @Desc("Don't interpolate, big cubes")
+ NONE,
+ @Desc("Uses linear interpolation in 3 dimensions, generally pretty good, but slow")
+ TRILINEAR,
+ @Desc("Uses cubic spline interpolation in 3 dimensions, even better, but extreme slowdowns")
+ TRICUBIC,
+ @Desc("Uses hermite spline interpolation in 3 dimensions, even better, but extreme slowdowns")
+ TRIHERMITE
+}
diff --git a/src/main/java/art/arcane/iris/builtin/objects/SurfaceSupportBufferSettings.java b/src/main/java/art/arcane/iris/builtin/objects/SurfaceSupportBufferSettings.java
new file mode 100644
index 000000000..91b44f3ec
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/objects/SurfaceSupportBufferSettings.java
@@ -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 .
+ */
+
+package art.arcane.iris.builtin.objects;
+
+import com.volmit.FeatureAttachment.Target;
+import com.volmit.IrisFeature;
+import com.volmit.config.Desc;
+import com.volmit.config.Feature;
+import com.volmit.config.MaxNumber;
+import com.volmit.config.MinNumber;
+
+/** The least surface-support buffer a dimension gives its surface objects, written as {@code "objectSurfaceSupportBuffer": 2}. */
+@Desc("Minimum surface-support buffer, in blocks, applied to every surface object placement in this dimension. A placement may ask for more but never less.")
+@Feature(id = "iris:objects/surface-support-buffer", name = "Surface support buffer", key = "objectSurfaceSupportBuffer", root = "buffer", targets = Target.DIMENSION)
+public final class SurfaceSupportBufferSettings implements IrisFeature {
+ private static final int DEFAULT_BUFFER_BLOCKS = 2;
+
+ @MinNumber(0)
+ @MaxNumber(16)
+ @Desc("Minimum surface-support buffer, in blocks, applied to every surface object placement in this dimension. A placement may ask for more but never less.")
+ private int buffer = DEFAULT_BUFFER_BLOCKS;
+
+ public SurfaceSupportBufferSettings() {
+ }
+
+ public int buffer() {
+ return buffer;
+ }
+}
diff --git a/src/main/java/art/arcane/iris/builtin/objects/TreeGrowthSettings.java b/src/main/java/art/arcane/iris/builtin/objects/TreeGrowthSettings.java
new file mode 100644
index 000000000..584fe7ea3
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/objects/TreeGrowthSettings.java
@@ -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 .
+ */
+
+package art.arcane.iris.builtin.objects;
+
+import com.volmit.FeatureAttachment.Target;
+import com.volmit.IrisFeature;
+import com.volmit.config.Desc;
+import com.volmit.config.Feature;
+import com.volmit.config.Required;
+import com.volmit.config.Snippet;
+
+/** Whether a dimension's saplings grow the trees of its object placements, written as {@code "treeSettings": {...}}. */
+@Snippet("tree-settings")
+@Desc("Tree growth override settings")
+@Feature(id = "iris:objects/trees", name = "Tree growth", key = "treeSettings", targets = Target.DIMENSION)
+public final class TreeGrowthSettings implements IrisFeature {
+ @Required
+ @Desc("Turn replacing on and off")
+ private boolean enabled = false;
+
+ @Desc("Object picking modes")
+ private TreeMode mode = TreeMode.FIRST;
+
+ public TreeGrowthSettings() {
+ }
+
+ public boolean enabled() {
+ return enabled;
+ }
+
+ public TreeMode mode() {
+ return mode == null ? TreeMode.FIRST : mode;
+ }
+}
diff --git a/src/main/java/art/arcane/iris/engine/object/procedural/tree/IrisTreeModes.java b/src/main/java/art/arcane/iris/builtin/objects/TreeMode.java
similarity index 78%
rename from src/main/java/art/arcane/iris/engine/object/procedural/tree/IrisTreeModes.java
rename to src/main/java/art/arcane/iris/builtin/objects/TreeMode.java
index 060e506ed..a0c643406 100644
--- a/src/main/java/art/arcane/iris/engine/object/procedural/tree/IrisTreeModes.java
+++ b/src/main/java/art/arcane/iris/builtin/objects/TreeMode.java
@@ -1,6 +1,6 @@
/*
- * Iris is a World Generator for Minecraft Bukkit Servers
- * Copyright (c) 2022 Arcane Arts (Volmit Software)
+ * 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
@@ -16,15 +16,15 @@
* along with this program. If not, see .
*/
-package art.arcane.iris.engine.object.procedural.tree;
+package art.arcane.iris.builtin.objects;
-import art.arcane.iris.engine.object.annotations.Desc;
+import com.volmit.config.Desc;
@Desc("Sapling override object picking options")
-public enum IrisTreeModes {
+public enum TreeMode {
@Desc("Check biome, then region, pick the first one that has options. Dimension placements are not consulted.")
FIRST,
@Desc("Check biome, regions, and dimensions, and pick any option from the total list")
ALL
-}
\ No newline at end of file
+}
diff --git a/src/main/java/art/arcane/iris/builtin/objects/TreeOverride.java b/src/main/java/art/arcane/iris/builtin/objects/TreeOverride.java
new file mode 100644
index 000000000..398959a35
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/objects/TreeOverride.java
@@ -0,0 +1,76 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.builtin.objects;
+
+import com.volmit.config.Desc;
+import com.volmit.config.MinItems;
+import com.volmit.config.Required;
+import com.volmit.config.Snippet;
+
+import java.util.Collections;
+import java.util.List;
+
+/** The trees an object placement overrides when their saplings grow, an entry of the placement's {@code trees}. */
+@Snippet("tree")
+@Desc("Tree replace options for this object placer")
+public final class TreeOverride {
+ @Required
+ @MinItems(1)
+ @Desc("The types of trees overwritten by this object")
+ private List treeTypes = List.of();
+
+ @Required
+ @MinItems(1)
+ @Desc("The size of the square of saplings this applies to (2 means a 2 * 2 sapling area)")
+ private List sizes = List.of();
+
+ public TreeOverride() {
+ }
+
+ public List treeTypes() {
+ return treeTypes == null ? List.of() : Collections.unmodifiableList(treeTypes);
+ }
+
+ public List sizes() {
+ return sizes == null ? List.of() : Collections.unmodifiableList(sizes);
+ }
+
+ /** Whether this override is for a sapling area of {@code width} by {@code depth} growing the species {@code species}. */
+ public boolean matches(int width, int depth, String species) {
+ return matchesSize(width, depth) && matchesSpecies(species);
+ }
+
+ private boolean matchesSize(int width, int depth) {
+ for (TreeSize size : sizes()) {
+ if (size.matches(width, depth)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private boolean matchesSpecies(String species) {
+ for (String type : treeTypes()) {
+ if (type != null && type.equalsIgnoreCase(species)) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
diff --git a/src/main/java/art/arcane/iris/builtin/objects/TreeSize.java b/src/main/java/art/arcane/iris/builtin/objects/TreeSize.java
new file mode 100644
index 000000000..3c6edd7b9
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/objects/TreeSize.java
@@ -0,0 +1,57 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.builtin.objects;
+
+import com.volmit.config.Desc;
+import com.volmit.config.Required;
+import com.volmit.config.Snippet;
+
+/** The size of a sapling area, in saplings, that a tree override applies to. */
+@Snippet("tree-size")
+@Desc("Sapling override object picking options")
+public final class TreeSize {
+ @Required
+ @Desc("The width of the sapling area")
+ private int width = 1;
+
+ @Required
+ @Desc("The depth of the sapling area")
+ private int depth = 1;
+
+ public TreeSize() {
+ }
+
+ public TreeSize(int width, int depth) {
+ this.width = width;
+ this.depth = depth;
+ }
+
+ public int width() {
+ return width;
+ }
+
+ public int depth() {
+ return depth;
+ }
+
+ /** Whether an area of {@code otherWidth} by {@code otherDepth} saplings is this size, turned either way. */
+ public boolean matches(int otherWidth, int otherDepth) {
+ return (width == otherWidth && depth == otherDepth) || (depth == otherWidth && width == otherDepth);
+ }
+}
diff --git a/src/main/java/art/arcane/iris/builtin/objects/UpperObjectsForceSettings.java b/src/main/java/art/arcane/iris/builtin/objects/UpperObjectsForceSettings.java
new file mode 100644
index 000000000..5264ce562
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/objects/UpperObjectsForceSettings.java
@@ -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 .
+ */
+
+package art.arcane.iris.builtin.objects;
+
+import com.volmit.FeatureAttachment.Target;
+import com.volmit.IrisFeature;
+import com.volmit.config.Desc;
+import com.volmit.config.Feature;
+
+/** Whether the objects placed in the terrain stacked above ignore placement restrictions, written as {@code "upperObjectsForcePlace": true}. */
+@Desc("When true, upper-dimension objects force-place regardless of placement restrictions (slope, underwater, clamp, collisions, carving). Normal dimension objects always place first; upper objects place second and may clip or occlude lower-dimension placements when this is enabled.")
+@Feature(id = "iris:objects/upper-force", name = "Force upper dimension objects", key = "upperObjectsForcePlace", root = "force", targets = Target.DIMENSION)
+public final class UpperObjectsForceSettings implements IrisFeature {
+ @Desc("When true, upper-dimension objects force-place regardless of placement restrictions (slope, underwater, clamp, collisions, carving). Normal dimension objects always place first; upper objects place second and may clip or occlude lower-dimension placements when this is enabled.")
+ private boolean force = false;
+
+ public UpperObjectsForceSettings() {
+ }
+
+ public boolean force() {
+ return force;
+ }
+}
diff --git a/src/main/java/art/arcane/iris/builtin/objects/UpperObjectsSettings.java b/src/main/java/art/arcane/iris/builtin/objects/UpperObjectsSettings.java
new file mode 100644
index 000000000..9d9c832fe
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/objects/UpperObjectsSettings.java
@@ -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 .
+ */
+
+package art.arcane.iris.builtin.objects;
+
+import com.volmit.FeatureAttachment.Target;
+import com.volmit.IrisFeature;
+import com.volmit.config.Desc;
+import com.volmit.config.Feature;
+
+/** Whether the objects of a dimension are also placed in the terrain stacked above it, written as {@code "upperDimensionObjects": true}. */
+@Desc("When true, objects from the mantle (structures, trees, etc.) can be placed in the upper dimension terrain zone. When false, the upper terrain is protected from object placement.")
+@Feature(id = "iris:objects/upper", name = "Upper dimension objects", key = "upperDimensionObjects", root = "enabled", targets = Target.DIMENSION)
+public final class UpperObjectsSettings implements IrisFeature {
+ @Desc("When true, objects from the mantle (structures, trees, etc.) can be placed in the upper dimension terrain zone. When false, the upper terrain is protected from object placement.")
+ private boolean enabled = false;
+
+ public UpperObjectsSettings() {
+ }
+
+ public boolean enabled() {
+ return enabled;
+ }
+}
diff --git a/src/main/java/art/arcane/iris/engine/object/procedural/tree/IrisProceduralTree.java b/src/main/java/art/arcane/iris/builtin/objects/tree/Tree.java
similarity index 59%
rename from src/main/java/art/arcane/iris/engine/object/procedural/tree/IrisProceduralTree.java
rename to src/main/java/art/arcane/iris/builtin/objects/tree/Tree.java
index 80d69facd..bc3fdbdab 100644
--- a/src/main/java/art/arcane/iris/engine/object/procedural/tree/IrisProceduralTree.java
+++ b/src/main/java/art/arcane/iris/builtin/objects/tree/Tree.java
@@ -1,6 +1,6 @@
/*
- * Iris is a World Generator for Minecraft Bukkit Servers
- * Copyright (c) 2022 Arcane Arts (Volmit Software)
+ * 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
@@ -16,53 +16,32 @@
* along with this program. If not, see .
*/
-package art.arcane.iris.engine.object.procedural.tree;
+package art.arcane.iris.builtin.objects.tree;
-import art.arcane.iris.builtin.objects.tree.TreeSecondaryLeaf;
-import art.arcane.iris.builtin.objects.tree.TreeDecorator;
-import art.arcane.iris.builtin.objects.tree.TreeCanopy;
-import art.arcane.iris.builtin.objects.tree.TreeRootStyle;
-import art.arcane.iris.builtin.objects.tree.TreeProfile;
-import art.arcane.iris.builtin.objects.tree.TreeFunction;
-import art.arcane.iris.builtin.objects.tree.TreeAzimuthMode;
-import art.arcane.iris.builtin.carve.CarvingMode;
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 art.arcane.iris.engine.object.material.IrisMaterialPalette;
-import art.arcane.iris.engine.object.placement.IrisObjectPlacement;
-import art.arcane.iris.engine.object.prefab.IrisObject;
-import art.arcane.iris.engine.object.prefab.IrisObjectRotation;
-import art.arcane.iris.engine.object.prefab.IrisObjectTranslate;
-import art.arcane.iris.engine.object.procedural.IrisProceduralPlacement;
-import art.arcane.iris.core.loader.IrisData;
-import art.arcane.volmlib.util.cache.AtomicCache;
-import art.arcane.iris.engine.object.annotations.ArrayType;
-import art.arcane.iris.engine.object.annotations.Desc;
-import art.arcane.iris.engine.object.annotations.MaxNumber;
-import art.arcane.iris.engine.object.annotations.MinNumber;
-import art.arcane.iris.engine.object.annotations.RegistryListBlockType;
-import art.arcane.iris.engine.object.annotations.Required;
-import art.arcane.iris.engine.object.annotations.Snippet;
-import art.arcane.iris.engine.object.procedural.tree.ProceduralTreeGenerator;
-import art.arcane.iris.spi.IrisLogging;
-import art.arcane.volmlib.util.collection.KList;
-import art.arcane.volmlib.util.math.RNG;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.Accessors;
+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.Ref;
+import com.volmit.config.Reference;
+import com.volmit.config.Required;
+import com.volmit.config.Snippet;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Optional;
@Snippet("procedural-tree")
-@Accessors(chain = true)
-@NoArgsConstructor
-@AllArgsConstructor
@Desc("A single procedurally generated tree. 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.")
-@Data
-public class IrisProceduralTree implements IrisProceduralPlacement {
- private final transient AtomicCache> variantCache = new AtomicCache<>();
-
+public final class Tree {
@Desc("A human readable name used in logs and as the variant load key.")
private String name = "procedural-tree";
@@ -90,7 +69,7 @@ public class IrisProceduralTree implements IrisProceduralPlacement {
private ObjectPlaceMode mode = ObjectPlaceMode.CENTER_HEIGHT;
@Desc("Rotate this tree's placement.")
- private IrisObjectRotation rotation = new IrisObjectRotation();
+ private ObjectRotation rotation = new ObjectRotation();
@Desc("Limit the max or min height of placement.")
private ObjectLimit clamp = new ObjectLimit();
@@ -102,7 +81,7 @@ public class IrisProceduralTree implements IrisProceduralPlacement {
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 IrisObjectTranslate translate = new IrisObjectTranslate();
+ 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;
@@ -112,19 +91,19 @@ public class IrisProceduralTree implements IrisProceduralPlacement {
@Required
@Desc("The trunk (log) block, e.g. minecraft:oak_log. Ignored when trunkPalette is set.")
- @RegistryListBlockType
+ @Ref(Reference.BLOCK)
private String trunk = "minecraft:oak_log";
@Desc("A noise-driven palette for the trunk. When set this overrides the single trunk block, letting the trunk mix blocks by noise.")
- private IrisMaterialPalette trunkPalette = null;
+ private PaletteSpec trunkPalette;
@Required
@Desc("The leaf block, e.g. minecraft:oak_leaves. Ignored when leavesPalette is set.")
- @RegistryListBlockType
+ @Ref(Reference.BLOCK)
private String leaves = "minecraft:oak_leaves";
@Desc("A noise-driven palette for the leaves. When set this overrides the single leaf block, letting the canopy mix leaf (or other) blocks by noise. Only blocks that are actually leaves get vanilla decay distances.")
- private IrisMaterialPalette leavesPalette = null;
+ private PaletteSpec leavesPalette;
@Desc("The named canopy profile that drives default crown radii and shape.")
private TreeProfile profile = TreeProfile.OAK;
@@ -209,27 +188,27 @@ public class IrisProceduralTree implements IrisProceduralPlacement {
private int azimuthWhorlCount = 5;
@Desc("Optional accent leaf block scattered through the canopy (blossoms, shroomlight).")
- @RegistryListBlockType
- private String secondaryLeaves = null;
+ @Ref(Reference.BLOCK)
+ private String secondaryLeaves;
@MinNumber(0)
@MaxNumber(1)
@Desc("The fraction of leaves replaced by the secondary leaf block(s).")
private double secondaryLeafFraction = 0.35;
- @ArrayType(min = 1, type = TreeSecondaryLeaf.class)
+ @MinItems(1)
@Desc("Optional weighted set of accent leaf blocks. When set this overrides the single secondaryLeaves block.")
- private KList weightedSecondaryLeaves = new KList<>();
+ private List weightedSecondaryLeaves = List.of();
@Desc("A noise-driven palette for the secondary (accent) leaves. When set this overrides both secondaryLeaves and weightedSecondaryLeaves.")
- private IrisMaterialPalette secondaryLeavesPalette = null;
+ private PaletteSpec secondaryLeavesPalette;
@Desc("Optional secondary trunk block used over a height band (for color-banded trunks). Ignored when secondaryTrunkPalette is set.")
- @RegistryListBlockType
- private String secondaryTrunk = null;
+ @Ref(Reference.BLOCK)
+ private String secondaryTrunk;
@Desc("A noise-driven palette for the secondary trunk band. When set this overrides the single secondaryTrunk block.")
- private IrisMaterialPalette secondaryTrunkPalette = null;
+ private PaletteSpec secondaryTrunkPalette;
@MinNumber(0)
@MaxNumber(1)
@@ -271,80 +250,254 @@ public class IrisProceduralTree implements IrisProceduralPlacement {
@Desc("The leaf crown configuration.")
private TreeCanopy canopy = new TreeCanopy();
- @ArrayType(min = 1, type = TreeDecorator.class)
+ @MinItems(1)
@Desc("Accent decorators applied after the tree is built (fruit, vines, snow, glow).")
- private KList decorators = new KList<>();
+ private List decorators = List.of();
- public KList getVariantObjects(IrisData data) {
- return variantCache.aquire(() -> {
- KList baked = new KList<>();
- int count = Math.max(1, variants);
- int lo = Math.min(heightMin, heightMax);
- int hi = Math.max(heightMin, heightMax);
- RNG heightRng = new RNG(seed);
-
- for (int i = 0; i < count; i++) {
- int height;
- if (count == 1 || lo == hi) {
- height = heightRng.i(lo, hi + 1);
- } else {
- double step = (hi - lo) / (double) (count - 1);
- double base = lo + step * i;
- double jitter = heightRng.d(-step * 0.3, step * 0.3);
- height = (int) Math.round(Math.max(lo, Math.min(hi, base + jitter)));
- }
-
- IrisObject object = ProceduralTreeGenerator.generate(this, Math.max(2, height), new RNG(seed + (i * 7919L)), data);
- if (object == null || object.getBlocks().isEmpty()) {
- continue;
- }
- object.setLoadKey(getVariantLoadKey(i));
- object.setLoader(data);
- baked.add(object);
- }
-
- if (new java.io.File("plugins/Iris/goldendebug.txt").isFile()) {
- for (IrisObject object : baked) {
- long[] digest = new long[]{0L};
- object.getBlocks().forEach((vector, state) -> {
- long position = ((long) vector.getBlockX() << 40) ^ ((long) vector.getBlockY() << 20) ^ vector.getBlockZ();
- digest[0] ^= Long.rotateLeft(position * 0x9E3779B97F4A7C15L ^ state.key().hashCode(), (int) (position & 63));
- });
- IrisLogging.debug("Goldendebug bake: " + object.getLoadKey() + " blocks=" + object.getBlocks().size() + " digest=" + Long.toHexString(digest[0]));
- }
- }
-
- return baked;
- });
+ public Tree() {
}
- public IrisObject getVariantObject(IrisData data, RNG rng) {
- KList baked = getVariantObjects(data);
- if (baked == null || baked.isEmpty()) {
- return null;
- }
- return baked.get(rng.i(baked.size()));
+ public String name() {
+ return name;
}
- public String getVariantLoadKey(int index) {
- if (index < 0) {
- throw new IllegalArgumentException("index must not be negative");
- }
- return "procedural/tree/" + name + "#" + index;
+ public double chance() {
+ return chance;
}
- public IrisObjectPlacement asPlacement() {
- IrisObjectPlacement placement = new IrisObjectPlacement();
- placement.setMode(mode);
- placement.setRotation(rotation);
- placement.setClamp(clamp);
- placement.setCarvingSupport(carvingSupport);
- placement.setUnderwater(underwater);
- placement.setTranslate(translate);
- placement.setStiltSettings(stiltSettings);
- placement.setVacuumSettings(vacuumSettings);
- placement.setChance(chance);
- placement.setDensity(density);
- return placement;
+ public int density() {
+ return density;
+ }
+
+ public int variants() {
+ return variants;
+ }
+
+ public long seed() {
+ return seed;
+ }
+
+ public boolean plausible() {
+ return plausible;
+ }
+
+ public ObjectPlaceMode mode() {
+ return mode;
+ }
+
+ public ObjectRotation rotation() {
+ return rotation;
+ }
+
+ public ObjectLimit clamp() {
+ return clamp;
+ }
+
+ public CarvingMode carvingSupport() {
+ return carvingSupport;
+ }
+
+ public boolean underwater() {
+ return underwater;
+ }
+
+ public ObjectTranslate translate() {
+ return translate;
+ }
+
+ public Optional stiltSettings() {
+ return Optional.ofNullable(stiltSettings);
+ }
+
+ public Optional vacuumSettings() {
+ return Optional.ofNullable(vacuumSettings);
+ }
+
+ public String trunk() {
+ return trunk;
+ }
+
+ public Optional trunkPalette() {
+ return Optional.ofNullable(trunkPalette);
+ }
+
+ public String leaves() {
+ return leaves;
+ }
+
+ public Optional leavesPalette() {
+ return Optional.ofNullable(leavesPalette);
+ }
+
+ public TreeProfile profile() {
+ return profile;
+ }
+
+ public int heightMin() {
+ return heightMin;
+ }
+
+ public int heightMax() {
+ return heightMax;
+ }
+
+ public int trunkWidth() {
+ return trunkWidth;
+ }
+
+ public TreeFunction trunkShape() {
+ return trunkShape;
+ }
+
+ public double shapeStart() {
+ return shapeStart;
+ }
+
+ public double shapeEnd() {
+ return shapeEnd;
+ }
+
+ public double shapeSteepness() {
+ return shapeSteepness;
+ }
+
+ public double shapeBase() {
+ return shapeBase;
+ }
+
+ public double shapePeriod() {
+ return shapePeriod;
+ }
+
+ public double shapeAmplitude() {
+ return shapeAmplitude;
+ }
+
+ public double shapePeakOffset() {
+ return shapePeakOffset;
+ }
+
+ public double shapeFloor() {
+ return shapeFloor;
+ }
+
+ public double leanAzimuth() {
+ return leanAzimuth;
+ }
+
+ public double leanAngle() {
+ return leanAngle;
+ }
+
+ public TreeFunction trunkCurve() {
+ return trunkCurve;
+ }
+
+ public double curveSteepness() {
+ return curveSteepness;
+ }
+
+ public TreeAzimuthMode leanAzimuthMode() {
+ return leanAzimuthMode;
+ }
+
+ public double azimuthStart() {
+ return azimuthStart;
+ }
+
+ public double azimuthEnd() {
+ return azimuthEnd;
+ }
+
+ public double azimuthTurns() {
+ return azimuthTurns;
+ }
+
+ public double azimuthAmplitude() {
+ return azimuthAmplitude;
+ }
+
+ public double azimuthPeriod() {
+ return azimuthPeriod;
+ }
+
+ public double azimuthOffset() {
+ return azimuthOffset;
+ }
+
+ public double azimuthScale() {
+ return azimuthScale;
+ }
+
+ public int azimuthWhorlCount() {
+ return azimuthWhorlCount;
+ }
+
+ public Optional secondaryLeaves() {
+ return Optional.ofNullable(secondaryLeaves);
+ }
+
+ public double secondaryLeafFraction() {
+ return secondaryLeafFraction;
+ }
+
+ public List weightedSecondaryLeaves() {
+ return weightedSecondaryLeaves == null ? List.of() : Collections.unmodifiableList(weightedSecondaryLeaves);
+ }
+
+ public Optional secondaryLeavesPalette() {
+ return Optional.ofNullable(secondaryLeavesPalette);
+ }
+
+ public Optional secondaryTrunk() {
+ return Optional.ofNullable(secondaryTrunk);
+ }
+
+ public Optional secondaryTrunkPalette() {
+ return Optional.ofNullable(secondaryTrunkPalette);
+ }
+
+ public double secondaryTrunkStart() {
+ return secondaryTrunkStart;
+ }
+
+ public double secondaryTrunkEnd() {
+ return secondaryTrunkEnd;
+ }
+
+ public boolean roots() {
+ return roots;
+ }
+
+ public TreeRootStyle rootStyle() {
+ return rootStyle;
+ }
+
+ public int rootDepth() {
+ return rootDepth;
+ }
+
+ public double rootFlare() {
+ return rootFlare;
+ }
+
+ public int trunkForks() {
+ return trunkForks;
+ }
+
+ public double forkHeight() {
+ return forkHeight;
+ }
+
+ public double forkAngle() {
+ return forkAngle;
+ }
+
+ public TreeCanopy canopy() {
+ return canopy;
+ }
+
+ public List decorators() {
+ return decorators == null ? List.of() : Collections.unmodifiableList(decorators);
}
}
diff --git a/src/main/java/art/arcane/iris/builtin/spawn/PlacementMarker.java b/src/main/java/art/arcane/iris/builtin/spawn/PlacementMarker.java
new file mode 100644
index 000000000..435cc4af5
--- /dev/null
+++ b/src/main/java/art/arcane/iris/builtin/spawn/PlacementMarker.java
@@ -0,0 +1,72 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.builtin.spawn;
+
+import com.volmit.block.BlockSpec;
+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.ResourceRef;
+import com.volmit.config.Snippet;
+
+import java.util.Collections;
+import java.util.List;
+
+/** Blocks of an object placement that get a {@link SpawnMarker}, an entry of the placement's {@code markers}. */
+@Snippet("object-marker")
+@Desc("Find blocks to mark")
+public final class PlacementMarker {
+ @MinItems(1)
+ @Required
+ @Desc("Find block types to mark")
+ private List mark = List.of();
+ @MinNumber(1)
+ @MaxNumber(16)
+ @Desc("The maximum amount of markers to place. Use these sparingly!")
+ private int maximumMarkers = 8;
+ @Desc("If true, markers will only be placed if the block matches the mark list perfectly.")
+ private boolean exact = false;
+ @Required
+ @ResourceRef(SpawnMarker.class)
+ @Desc("The marker to add")
+ private String marker;
+
+ public PlacementMarker() {
+ }
+
+ /** The blocks that get a marker. */
+ public List mark() {
+ return mark == null ? List.of() : Collections.unmodifiableList(mark);
+ }
+
+ public int maximumMarkers() {
+ return maximumMarkers;
+ }
+
+ public boolean exact() {
+ return exact;
+ }
+
+ /** The key of the {@link SpawnMarker} to place. */
+ public String marker() {
+ return marker;
+ }
+}
diff --git a/src/main/java/art/arcane/iris/engine/mantle/components/ObjectLocating.java b/src/main/java/art/arcane/iris/engine/mantle/components/ObjectLocating.java
index e4e27f575..98b448b57 100644
--- a/src/main/java/art/arcane/iris/engine/mantle/components/ObjectLocating.java
+++ b/src/main/java/art/arcane/iris/engine/mantle/components/ObjectLocating.java
@@ -18,6 +18,7 @@
package art.arcane.iris.engine.mantle.components;
+import art.arcane.iris.engine.object.placement.ObjectPlacements;
import art.arcane.iris.core.modules.IrisPackWorld;
import art.arcane.iris.engine.framework.Engine;
import art.arcane.iris.engine.object.placement.IrisObjectPlacement;
@@ -44,14 +45,14 @@ public final class ObjectLocating implements ObjectsAt {
Engine engine = engine(world);
Set biomes = new LinkedHashSet<>();
for (IrisBiome biome : engine.getDimension().getReachableBiomes(engine)) {
- if (biome != null && placesObject(biome.getSurfaceObjects(), objectKey)) {
+ if (biome != null && placesObject(ObjectPlacements.surface(biome), objectKey)) {
biomes.add(biome.getLoadKey());
}
}
Set regions = new LinkedHashSet<>();
for (IrisRegion region : engine.getDimension().getAllRegions(engine)) {
- if (region != null && placesObject(region.getSurfaceObjects(), objectKey)) {
+ if (region != null && placesObject(ObjectPlacements.surface(region), objectKey)) {
regions.add(region.getLoadKey());
}
}
diff --git a/src/main/java/art/arcane/iris/engine/mantle/components/ObjectModule.java b/src/main/java/art/arcane/iris/engine/mantle/components/ObjectModule.java
index b4b572e9b..de1aa17d6 100644
--- a/src/main/java/art/arcane/iris/engine/mantle/components/ObjectModule.java
+++ b/src/main/java/art/arcane/iris/engine/mantle/components/ObjectModule.java
@@ -19,14 +19,13 @@
package art.arcane.iris.engine.mantle.components;
import art.arcane.iris.builtin.IrisStages;
-import art.arcane.iris.builtin.objects.coral.Coral;
-import art.arcane.iris.builtin.objects.crystal.Crystal;
-import art.arcane.iris.builtin.objects.formation.Formation;
-import art.arcane.iris.builtin.objects.fungi.Fungus;
-import art.arcane.iris.builtin.objects.ruin.Ruin;
-import art.arcane.iris.builtin.objects.tree.TreeCanopy;
-import art.arcane.iris.builtin.objects.tree.TreeDecorator;
-import art.arcane.iris.builtin.objects.tree.TreeSecondaryLeaf;
+import art.arcane.iris.builtin.objects.ObjectSettings;
+import art.arcane.iris.builtin.objects.ProceduralObjectSettings;
+import art.arcane.iris.builtin.objects.RequireSurfaceSupportSettings;
+import art.arcane.iris.builtin.objects.SurfaceSupportBufferSettings;
+import art.arcane.iris.builtin.objects.TreeGrowthSettings;
+import art.arcane.iris.builtin.objects.UpperObjectsForceSettings;
+import art.arcane.iris.builtin.objects.UpperObjectsSettings;
import art.arcane.iris.core.modules.IrisMantleChunk;
import art.arcane.iris.core.modules.IrisPackSettings;
import art.arcane.iris.core.modules.IrisPackWorld;
@@ -71,14 +70,13 @@ public final class ObjectModule implements IrisModule, ModuleLifecycle {
log = registry.log();
registry.registerService(ObjectsAt.class, new ObjectLocating());
registry.registerService(SaplingGrowth.class, new TreeGrowing());
- registry.registerHeldType(TreeCanopy.class);
- registry.registerHeldType(TreeDecorator.class);
- registry.registerHeldType(TreeSecondaryLeaf.class);
- registry.registerHeldType(Coral.class);
- registry.registerHeldType(Crystal.class);
- registry.registerHeldType(Formation.class);
- registry.registerHeldType(Fungus.class);
- registry.registerHeldType(Ruin.class);
+ registry.registerSettings(ObjectSettings.class);
+ registry.registerSettings(ProceduralObjectSettings.class);
+ registry.registerSettings(TreeGrowthSettings.class);
+ registry.registerSettings(RequireSurfaceSupportSettings.class);
+ registry.registerSettings(SurfaceSupportBufferSettings.class);
+ registry.registerSettings(UpperObjectsSettings.class);
+ registry.registerSettings(UpperObjectsForceSettings.class);
registry.registerLifecycle(this);
}
diff --git a/src/main/java/art/arcane/iris/engine/mantle/components/ObjectPlacing.java b/src/main/java/art/arcane/iris/engine/mantle/components/ObjectPlacing.java
index 87f2a3f23..92ae78dc8 100644
--- a/src/main/java/art/arcane/iris/engine/mantle/components/ObjectPlacing.java
+++ b/src/main/java/art/arcane/iris/engine/mantle/components/ObjectPlacing.java
@@ -27,6 +27,7 @@ import art.arcane.iris.builtin.anchor.ObjectPlaceMode;
import art.arcane.iris.builtin.prepare.AxisRotationClamp;
import art.arcane.iris.engine.object.terrain.carving.CaveProfiles;
import art.arcane.iris.engine.object.placement.IrisObjectPlacement;
+import art.arcane.iris.engine.object.placement.ObjectPlacements;
import art.arcane.iris.engine.object.placement.IrisObjectVacuum;
import art.arcane.iris.core.IrisSettings;
import art.arcane.iris.util.common.data.B;
@@ -43,9 +44,9 @@ import art.arcane.iris.engine.object.world.dimension.IrisDimension;
import art.arcane.iris.engine.object.prefab.IrisObject;
import art.arcane.iris.engine.object.prefab.IrisObjectRotation;
import art.arcane.iris.engine.object.prefab.IrisObjectTranslate;
-import art.arcane.iris.engine.object.procedural.IrisProceduralObjects;
+import art.arcane.iris.engine.object.procedural.ResolvedProceduralObjects;
import art.arcane.iris.engine.object.procedural.IrisProceduralPlacement;
-import art.arcane.iris.engine.object.procedural.tree.IrisProceduralTree;
+import art.arcane.iris.engine.object.procedural.tree.ResolvedTree;
import art.arcane.iris.engine.object.world.region.IrisRegion;
import art.arcane.volmlib.util.collection.KList;
import art.arcane.volmlib.util.collection.KMap;
@@ -145,8 +146,8 @@ public class ObjectPlacing {
+ " surfaceY=" + surfaceY
+ " maxAnchorY=" + maxY
+ " carvedAtCenter=" + carvedBlocks
- + " biomeCarvingObjects=" + caveBiome.getCarvingObjects().size()
- + " regionCarvingObjects=" + region.getCarvingObjects().size()
+ + " biomeCarvingObjects=" + ObjectPlacements.carving(caveBiome).size()
+ + " regionCarvingObjects=" + ObjectPlacements.carving(region).size()
+ " sameBiome=" + (caveBiome == surfaceBiome || java.util.Objects.equals(caveBiome.getLoadKey(), surfaceBiome.getLoadKey())));
}
if (traceRegen) {
@@ -154,16 +155,16 @@ public class ObjectPlacing {
+ " surfaceBiome=" + surfaceBiome.getLoadKey()
+ " caveBiome=" + caveBiome.getLoadKey()
+ " region=" + region.getLoadKey()
- + " biomeSurfacePlacers=" + surfaceBiome.getSurfaceObjects().size()
- + " biomeCavePlacers=" + caveBiome.getCarvingObjects().size()
- + " regionSurfacePlacers=" + region.getSurfaceObjects().size()
- + " regionCavePlacers=" + region.getCarvingObjects().size());
+ + " biomeSurfacePlacers=" + ObjectPlacements.surface(surfaceBiome).size()
+ + " biomeCavePlacers=" + ObjectPlacements.carving(caveBiome).size()
+ + " regionSurfacePlacers=" + ObjectPlacements.surface(region).size()
+ + " regionCavePlacers=" + ObjectPlacements.carving(region).size());
}
ObjectPlacementSummary summary = placeObjects(writer, rng, x, z, surfaceBiome, caveBiome, region, complex, traceRegen);
placeProceduralObjects(writer, rng, x, z, surfaceBiome, caveBiome, region);
UpperDimensionContext upperCtx = engine.getUpperContext();
IrisDimension dimension = engine.getDimension();
- if (upperCtx != null && dimension.isUpperDimensionObjects()) {
+ if (upperCtx != null && ObjectPlacements.upperObjects(dimension)) {
placeUpperObjects(writer, rng, x, z, xxx, zzz, surfaceY, upperCtx, dimension, complex, traceRegen);
}
if (traceRegen) {
@@ -212,7 +213,7 @@ public class ObjectPlacing {
continue;
}
- if (!sampled.getCarvingObjects().isEmpty()) {
+ if (!ObjectPlacements.carving(sampled).isEmpty()) {
ladderChoice = sampled;
}
}
@@ -243,7 +244,7 @@ public class ObjectPlacing {
CaveProfile regionCaveProfile = resolveCaveProfile(CaveProfiles.declaredBy(region), CaveProfiles.declaredBy(caveBiome));
CaveAnchorCache caveAnchorCache = new CaveAnchorCache();
- for (IrisObjectPlacement i : surfaceBiome.getSurfaceObjects()) {
+ for (IrisObjectPlacement i : ObjectPlacements.surface(surfaceBiome)) {
biomeSurfaceChecked++;
boolean chance = rng.chance(i.getChance() + rng.d(-0.005, 0.005));
if (traceRegen) {
@@ -272,7 +273,7 @@ public class ObjectPlacing {
}
}
- for (IrisObjectPlacement i : caveBiome.getCarvingObjects()) {
+ for (IrisObjectPlacement i : ObjectPlacements.carving(caveBiome)) {
if (!i.getCarvingSupport().supportsCarving()) {
continue;
}
@@ -304,7 +305,7 @@ public class ObjectPlacing {
}
}
- for (IrisObjectPlacement i : region.getSurfaceObjects()) {
+ for (IrisObjectPlacement i : ObjectPlacements.surface(region)) {
regionSurfaceChecked++;
boolean chance = rng.chance(i.getChance() + rng.d(-0.005, 0.005));
if (traceRegen) {
@@ -333,7 +334,7 @@ public class ObjectPlacing {
}
}
- for (IrisObjectPlacement i : region.getCarvingObjects()) {
+ for (IrisObjectPlacement i : ObjectPlacements.carving(region)) {
if (!i.getCarvingSupport().supportsCarving()) {
continue;
}
@@ -386,11 +387,11 @@ public class ObjectPlacing {
private void placeProceduralObjects(MantleWriter writer, RNG rng, int x, int z, IrisBiome surfaceBiome, IrisBiome caveBiome, IrisRegion region) {
CaveProfile surfaceCaveProfile = resolveCaveProfile(CaveProfiles.declaredBy(surfaceBiome), CaveProfiles.declaredBy(region));
CaveProfile regionCaveProfile = resolveCaveProfile(CaveProfiles.declaredBy(region), caveBiome == null ? null : CaveProfiles.declaredBy(caveBiome));
- placeProceduralFrom(writer, rng, x, z, surfaceBiome.getProceduralObjects(), surfaceBiome.getName(), surfaceCaveProfile, surfaceBiome.getLoadKey());
- placeProceduralFrom(writer, rng, x, z, region.getProceduralObjects(), region.getName(), regionCaveProfile, null);
+ placeProceduralFrom(writer, rng, x, z, ObjectPlacements.procedural(surfaceBiome), surfaceBiome.getName(), surfaceCaveProfile, surfaceBiome.getLoadKey());
+ placeProceduralFrom(writer, rng, x, z, ObjectPlacements.procedural(region), region.getName(), regionCaveProfile, null);
if (caveBiome != null && caveBiome != surfaceBiome) {
CaveProfile caveProfile = resolveCaveProfile(CaveProfiles.declaredBy(caveBiome), CaveProfiles.declaredBy(region));
- placeProceduralFrom(writer, rng, x, z, caveBiome.getProceduralObjects(), caveBiome.getName(), caveProfile, caveBiome.getLoadKey());
+ placeProceduralFrom(writer, rng, x, z, ObjectPlacements.procedural(caveBiome), caveBiome.getName(), caveProfile, caveBiome.getLoadKey());
}
}
@@ -400,7 +401,7 @@ public class ObjectPlacing {
RNG rng,
int x,
int z,
- IrisProceduralObjects proceduralObjects,
+ ResolvedProceduralObjects proceduralObjects,
String scope,
CaveProfile caveProfile,
String expectedCaveBiomeKey
@@ -414,7 +415,7 @@ public class ObjectPlacing {
boolean golden = GoldenDebugObjectPlacer.isGoldenDebugChunk(x, z);
CaveAnchorCache caveAnchorCache = new CaveAnchorCache();
for (IrisProceduralPlacement p : proceduralObjects.getAllPlacements()) {
- boolean treePlacement = p instanceof IrisProceduralTree;
+ boolean treePlacement = p instanceof ResolvedTree;
boolean chancePassed = passesProceduralChance(rng, p.getChance());
if (golden) {
log.debug("Goldendebug procedural chance: chunk=" + x + "," + z
@@ -979,9 +980,9 @@ public class ObjectPlacing {
return;
}
- boolean forcePlace = dimension.isUpperObjectsForcePlace();
+ boolean forcePlace = ObjectPlacements.upperObjectsForced(dimension);
if (upperBiome != null) {
- for (IrisObjectPlacement i : upperBiome.getSurfaceObjects()) {
+ for (IrisObjectPlacement i : ObjectPlacements.surface(upperBiome)) {
if (!rng.chance(i.getChance() + rng.d(-0.005, 0.005))) {
continue;
}
@@ -995,7 +996,7 @@ public class ObjectPlacing {
}
if (upperRegion != null) {
- for (IrisObjectPlacement i : upperRegion.getSurfaceObjects()) {
+ for (IrisObjectPlacement i : ObjectPlacements.surface(upperRegion)) {
if (!rng.chance(i.getChance() + rng.d(-0.005, 0.005))) {
continue;
}
@@ -1163,8 +1164,8 @@ public class ObjectPlacing {
/** Dimension acts as the floor: it can force support on and widen the buffer, never weaken either. */
private IrisObjectPlacement applyDimensionSurfaceSupport(IrisObjectPlacement placement) {
IrisDimension dimension = engine.getDimension();
- boolean require = placement.isRequireSurfaceSupport() && dimension.isRequireObjectSurfaceSupport();
- int buffer = Math.max(placement.getSurfaceSupportBuffer(), dimension.getObjectSurfaceSupportBuffer());
+ boolean require = placement.isRequireSurfaceSupport() && ObjectPlacements.requiresSurfaceSupport(dimension);
+ int buffer = Math.max(placement.getSurfaceSupportBuffer(), ObjectPlacements.surfaceSupportBuffer(dimension));
if (require == placement.isRequireSurfaceSupport() && buffer == placement.getSurfaceSupportBuffer()) {
return placement;
}
@@ -1432,13 +1433,13 @@ public class ObjectPlacing {
IrisBiome biome = engine.getSurfaceBiome((x << 4) + 8, (z << 4) + 8);
IrisRegion region = engine.getRegion((x << 4) + 8, (z << 4) + 8);
Set v = new KSet<>();
- for (IrisObjectPlacement i : biome.getSurfaceObjects()) {
+ for (IrisObjectPlacement i : ObjectPlacements.surface(biome)) {
if (rng.chance(i.getChance() + rng.d(-0.005, 0.005))) {
v.addAll(guessPlacedKeys(rng, x, z, i));
}
}
- for (IrisObjectPlacement i : region.getSurfaceObjects()) {
+ for (IrisObjectPlacement i : ObjectPlacements.surface(region)) {
if (rng.chance(i.getChance() + rng.d(-0.005, 0.005))) {
v.addAll(guessPlacedKeys(rng, x, z, i));
}
@@ -1457,15 +1458,15 @@ public class ObjectPlacing {
if (region == null) {
continue;
}
- radius = Math.max(radius, computePlacementRadius(region.getObjects(), sizeCache, warnedLargeObjects));
- radius = Math.max(radius, computeProceduralRadius(region.getProceduralObjects()));
+ radius = Math.max(radius, computePlacementRadius(ObjectPlacements.all(region), sizeCache, warnedLargeObjects));
+ radius = Math.max(radius, computeProceduralRadius(ObjectPlacements.procedural(region)));
}
for (IrisBiome biome : dimension.getReachableBiomes(engine)) {
if (biome == null) {
continue;
}
- radius = Math.max(radius, computePlacementRadius(biome.getObjects(), sizeCache, warnedLargeObjects));
- radius = Math.max(radius, computeProceduralRadius(biome.getProceduralObjects()));
+ radius = Math.max(radius, computePlacementRadius(ObjectPlacements.all(biome), sizeCache, warnedLargeObjects));
+ radius = Math.max(radius, computeProceduralRadius(ObjectPlacements.procedural(biome)));
}
return radius;
@@ -1500,7 +1501,7 @@ public class ObjectPlacing {
return radius;
}
- private int computeProceduralRadius(IrisProceduralObjects procedural) {
+ private int computeProceduralRadius(ResolvedProceduralObjects procedural) {
if (procedural == null || procedural.isEmpty()) {
return 0;
}
diff --git a/src/main/java/art/arcane/iris/engine/mantle/components/ObjectWarmUp.java b/src/main/java/art/arcane/iris/engine/mantle/components/ObjectWarmUp.java
index 71880284c..5f8855641 100644
--- a/src/main/java/art/arcane/iris/engine/mantle/components/ObjectWarmUp.java
+++ b/src/main/java/art/arcane/iris/engine/mantle/components/ObjectWarmUp.java
@@ -20,7 +20,8 @@ package art.arcane.iris.engine.mantle.components;
import art.arcane.iris.engine.framework.Engine;
import art.arcane.iris.engine.object.placement.IrisObjectPlacement;
-import art.arcane.iris.engine.object.procedural.IrisProceduralObjects;
+import art.arcane.iris.engine.object.placement.ObjectPlacements;
+import art.arcane.iris.engine.object.procedural.ResolvedProceduralObjects;
import art.arcane.iris.engine.object.procedural.IrisProceduralPlacement;
import art.arcane.iris.engine.object.world.biome.IrisBiome;
import art.arcane.iris.engine.object.world.region.IrisRegion;
@@ -52,15 +53,15 @@ final class ObjectWarmUp {
KList biomes = engine.getAllBiomes();
biomes.sort(Comparator.comparing(IrisBiome::getLoadKey));
for (IrisBiome biome : biomes) {
- warmPlacements(biome.getObjects());
- warmProcedural(biome.getProceduralObjects());
+ warmPlacements(ObjectPlacements.all(biome));
+ warmProcedural(ObjectPlacements.procedural(biome));
}
KList regions = engine.getDimension().getAllRegions(engine);
regions.sort(Comparator.comparing(IrisRegion::getLoadKey));
for (IrisRegion region : regions) {
- warmPlacements(region.getObjects());
- warmProcedural(region.getProceduralObjects());
+ warmPlacements(ObjectPlacements.all(region));
+ warmProcedural(ObjectPlacements.procedural(region));
}
}
@@ -78,7 +79,7 @@ final class ObjectWarmUp {
}
}
- private void warmProcedural(IrisProceduralObjects procedural) {
+ private void warmProcedural(ResolvedProceduralObjects procedural) {
if (procedural == null) {
return;
}
diff --git a/src/main/java/art/arcane/iris/engine/mantle/components/TreeGrowing.java b/src/main/java/art/arcane/iris/engine/mantle/components/TreeGrowing.java
index 40dee1a6d..bd8a3c3d1 100644
--- a/src/main/java/art/arcane/iris/engine/mantle/components/TreeGrowing.java
+++ b/src/main/java/art/arcane/iris/engine/mantle/components/TreeGrowing.java
@@ -24,12 +24,13 @@ import art.arcane.iris.core.modules.PlatformBlockStates;
import art.arcane.iris.engine.framework.Engine;
import art.arcane.iris.engine.object.placement.IObjectPlacer;
import art.arcane.iris.engine.object.placement.IrisObjectPlacement;
-import art.arcane.iris.engine.object.placement.IrisTreeSize;
+import art.arcane.iris.engine.object.placement.ObjectPlacements;
import art.arcane.iris.engine.object.prefab.IrisObject;
import art.arcane.iris.engine.object.prefab.TileData;
-import art.arcane.iris.engine.object.procedural.IrisProceduralObjects;
-import art.arcane.iris.engine.object.procedural.tree.IrisProceduralTree;
-import art.arcane.iris.engine.object.procedural.tree.IrisTreeModes;
+import art.arcane.iris.engine.object.procedural.ResolvedProceduralObjects;
+import art.arcane.iris.builtin.objects.tree.Tree;
+import art.arcane.iris.engine.object.procedural.tree.ResolvedTree;
+import art.arcane.iris.builtin.objects.TreeMode;
import art.arcane.iris.engine.object.world.biome.IrisBiome;
import art.arcane.iris.engine.object.world.region.IrisRegion;
import art.arcane.iris.spi.IrisPlatforms;
@@ -54,12 +55,13 @@ import java.util.Set;
* of blocks the host then places. The same placements tell which objects are trees.
*/
public final class TreeGrowing implements SaplingGrowth {
- private static final IrisTreeSize SAPLING_SIZE = new IrisTreeSize(1, 1);
+ private static final int SAPLING_WIDTH = 1;
+ private static final int SAPLING_DEPTH = 1;
@Override
public Optional grow(PackWorld world, Sapling sapling, Surroundings surroundings) {
Engine engine = IrisPackWorld.of(world).engine();
- if (!engine.getDimension().getTreeSettings().isEnabled()) {
+ if (!ObjectPlacements.treeGrowth(engine.getDimension()).enabled()) {
return Optional.empty();
}
@@ -84,14 +86,14 @@ public final class TreeGrowing implements SaplingGrowth {
for (IrisRegion region : engine.getDimension().getAllRegions(engine)) {
if (region != null) {
- collectPlacements(region.getObjects(), objects);
- collectProceduralTrees(region.getProceduralObjects(), procedural);
+ collectPlacements(ObjectPlacements.all(region), objects);
+ collectProceduralTrees(ObjectPlacements.procedural(region), procedural);
}
}
for (IrisBiome biome : engine.getDimension().getReachableBiomes(engine)) {
if (biome != null) {
- collectPlacements(biome.getObjects(), objects);
- collectProceduralTrees(biome.getProceduralObjects(), procedural);
+ collectPlacements(ObjectPlacements.all(biome), objects);
+ collectProceduralTrees(ObjectPlacements.procedural(biome), procedural);
}
}
return new TreeObjects(objects, procedural);
@@ -100,12 +102,12 @@ public final class TreeGrowing implements SaplingGrowth {
/** One placement, picked at random, of the tree placements that grow {@code sapling}'s species; null for none. */
private static IrisObjectPlacement pickPlacement(Engine engine, Sapling sapling) {
KList placements = new KList<>();
- boolean useAll = engine.getDimension().getTreeSettings().getMode().equals(IrisTreeModes.ALL);
+ boolean useAll = ObjectPlacements.treeGrowth(engine.getDimension()).mode() == TreeMode.ALL;
BlockPosition at = sapling.at();
- placements.addAll(matching(engine.getBiome(at.x(), at.y(), at.z()).getObjects(), sapling.species()));
+ placements.addAll(matching(ObjectPlacements.all(engine.getBiome(at.x(), at.y(), at.z())), sapling.species()));
if (useAll || placements.isEmpty()) {
- placements.addAll(matching(engine.getRegion(at.x(), at.z()).getObjects(), sapling.species()));
+ placements.addAll(matching(ObjectPlacements.all(engine.getRegion(at.x(), at.z())), sapling.species()));
}
return placements.isNotEmpty() ? placements.getRandom() : null;
}
@@ -113,7 +115,7 @@ public final class TreeGrowing implements SaplingGrowth {
private static KList matching(KList objects, String species) {
KList matches = new KList<>();
for (IrisObjectPlacement placement : objects) {
- if (placement.matches(SAPLING_SIZE, species)) {
+ if (placement.matches(SAPLING_WIDTH, SAPLING_DEPTH, species)) {
matches.add(placement);
}
}
@@ -139,17 +141,18 @@ public final class TreeGrowing implements SaplingGrowth {
}
}
- private static void collectProceduralTrees(IrisProceduralObjects proceduralObjects, Set objectKeys) {
+ private static void collectProceduralTrees(ResolvedProceduralObjects proceduralObjects, Set objectKeys) {
if (proceduralObjects == null || proceduralObjects.getTrees() == null) {
return;
}
- for (IrisProceduralTree tree : proceduralObjects.getTrees()) {
- if (tree == null || tree.getName() == null || tree.getName().isBlank()) {
+ for (ResolvedTree resolved : proceduralObjects.getTrees()) {
+ Tree tree = resolved.settings();
+ if (tree.name() == null || tree.name().isBlank()) {
continue;
}
- int variants = Math.max(1, tree.getVariants());
+ int variants = Math.max(1, tree.variants());
for (int index = 0; index < variants; index++) {
- objectKeys.add(tree.getVariantLoadKey(index));
+ objectKeys.add(resolved.getVariantLoadKey(index));
}
}
}
diff --git a/src/main/java/art/arcane/iris/engine/object/placement/IrisObjectPlacement.java b/src/main/java/art/arcane/iris/engine/object/placement/IrisObjectPlacement.java
index 2a7c4583c..557aa63cf 100644
--- a/src/main/java/art/arcane/iris/engine/object/placement/IrisObjectPlacement.java
+++ b/src/main/java/art/arcane/iris/engine/object/placement/IrisObjectPlacement.java
@@ -19,6 +19,7 @@
package art.arcane.iris.engine.object.placement;
import art.arcane.iris.builtin.carve.CarvingMode;
+import art.arcane.iris.builtin.objects.TreeOverride;
import art.arcane.iris.builtin.carve.CaveAnchorMode;
import art.arcane.iris.builtin.anchor.ObjectPlaceMode;
import art.arcane.iris.builtin.blocks.ObjectReplace;
@@ -63,7 +64,6 @@ import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.bukkit.Bukkit;
-import org.bukkit.TreeType;
import org.jetbrains.annotations.Nullable;
@@ -176,8 +176,8 @@ public class IrisObjectPlacement {
@Desc("Whether the given loot tables override any and all other loot tables available in the dimension, region or biome.")
private boolean overrideGlobalLoot = false;
@Desc("This object / these objects override the following trees when they grow...")
- @ArrayType(min = 1, type = IrisTree.class)
- private KList trees = new KList<>();
+ @ArrayType(min = 1, type = TreeOverride.class)
+ private KList trees = new KList<>();
@RegistryListResource(IrisObject.class)
@ArrayType(type = String.class)
@Desc("List of objects to this object is allowed to collied with")
@@ -267,14 +267,10 @@ public class IrisObjectPlacement {
return g.getData().getObjectLoader().load(place.get(random.nextInt(place.size())));
}
- /** Whether a tree placement grows the species the platform calls {@code species} for a sapling area of {@code size}. */
- public boolean matches(IrisTreeSize size, String species) {
- return matches(size, TreeType.valueOf(species));
- }
-
- public boolean matches(IrisTreeSize size, TreeType type) {
- for (IrisTree i : getTrees()) {
- if (i.matches(size, type)) {
+ /** Whether a tree placement grows the species the platform calls {@code species} for a sapling area of {@code width} by {@code depth}. */
+ public boolean matches(int width, int depth, String species) {
+ for (TreeOverride tree : getTrees()) {
+ if (tree.matches(width, depth, species)) {
return true;
}
}
diff --git a/src/main/java/art/arcane/iris/engine/object/placement/IrisTree.java b/src/main/java/art/arcane/iris/engine/object/placement/IrisTree.java
deleted file mode 100644
index 5f99d7bb5..000000000
--- a/src/main/java/art/arcane/iris/engine/object/placement/IrisTree.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * 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 .
- */
-
-package art.arcane.iris.engine.object.placement;
-
-import art.arcane.iris.engine.object.annotations.ArrayType;
-import art.arcane.iris.engine.object.annotations.Desc;
-import art.arcane.iris.engine.object.annotations.Required;
-import art.arcane.iris.engine.object.annotations.Snippet;
-import art.arcane.volmlib.util.collection.KList;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.Accessors;
-import org.bukkit.TreeType;
-
-@Snippet("tree")
-@Accessors(chain = true)
-@AllArgsConstructor
-@NoArgsConstructor
-@Desc("Tree replace options for this object placer")
-@Data
-public class IrisTree {
- @Required
- @Desc("The types of trees overwritten by this object")
- @ArrayType(min = 1, type = String.class)
- private KList treeTypes = new KList<>();
-
-
- @Required
- @Desc("The size of the square of saplings this applies to (2 means a 2 * 2 sapling area)")
- @ArrayType(min = 1, type = IrisTreeSize.class)
- private KList sizes = new KList<>();
-
-
- public boolean matches(IrisTreeSize size, TreeType type) {
- if (!matchesSize(size)) {
- return false;
- }
-
- return matchesType(type);
- }
-
- private boolean matchesSize(IrisTreeSize size) {
- for (IrisTreeSize i : getSizes()) {
- if ((i.getDepth() == size.getDepth() && i.getWidth() == size.getWidth()) || (i.getDepth() == size.getWidth() && i.getWidth() == size.getDepth())) {
- return true;
- }
- }
-
- return false;
- }
-
- private boolean matchesType(TreeType type) {
- if (type == null) {
- return false;
- }
-
- String name = type.name();
- for (String i : getTreeTypes()) {
- if (i != null && i.equalsIgnoreCase(name)) {
- return true;
- }
- }
-
- return false;
- }
-}
\ No newline at end of file
diff --git a/src/main/java/art/arcane/iris/engine/object/placement/IrisTreeSize.java b/src/main/java/art/arcane/iris/engine/object/placement/IrisTreeSize.java
deleted file mode 100644
index 31d9c026c..000000000
--- a/src/main/java/art/arcane/iris/engine/object/placement/IrisTreeSize.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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 .
- */
-
-package art.arcane.iris.engine.object.placement;
-
-import art.arcane.iris.engine.object.annotations.Desc;
-import art.arcane.iris.engine.object.annotations.Required;
-import art.arcane.iris.engine.object.annotations.Snippet;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.Accessors;
-
-@Snippet("tree-size")
-@Accessors(chain = true)
-@NoArgsConstructor
-@AllArgsConstructor
-@Desc("Sapling override object picking options")
-@Data
-public class IrisTreeSize {
-
- @Required
- @Desc("The width of the sapling area")
- int width = 1;
-
- @Required
- @Desc("The depth of the sapling area")
- int depth = 1;
-
- /**
- * Does the size match
- *
- * @param size the size to check match
- * @return true if it matches (fits within width and depth)
- */
- public boolean doesMatch(IrisTreeSize size) {
- return (width == size.getWidth() && depth == size.getDepth()) || (depth == size.getWidth() && width == size.getDepth());
- }
-}
diff --git a/src/main/java/art/arcane/iris/engine/object/placement/ObjectPlacements.java b/src/main/java/art/arcane/iris/engine/object/placement/ObjectPlacements.java
new file mode 100644
index 000000000..4296c7c08
--- /dev/null
+++ b/src/main/java/art/arcane/iris/engine/object/placement/ObjectPlacements.java
@@ -0,0 +1,139 @@
+/*
+ * Iris is a World Generator for Minecraft Servers
+ * Copyright (c) 2026 Arcane Arts (Volmit Software)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package art.arcane.iris.engine.object.placement;
+
+import art.arcane.iris.builtin.objects.ObjectPlacement;
+import art.arcane.iris.builtin.objects.ObjectSettings;
+import art.arcane.iris.builtin.objects.ProceduralObjectSettings;
+import art.arcane.iris.builtin.objects.RequireSurfaceSupportSettings;
+import art.arcane.iris.builtin.objects.SurfaceSupportBufferSettings;
+import art.arcane.iris.builtin.objects.TreeGrowthSettings;
+import art.arcane.iris.builtin.objects.UpperObjectsForceSettings;
+import art.arcane.iris.builtin.objects.UpperObjectsSettings;
+import art.arcane.iris.core.loader.IrisData;
+import art.arcane.iris.core.loader.IrisRegistrant;
+import art.arcane.iris.engine.object.procedural.ResolvedProceduralObjects;
+import art.arcane.volmlib.util.collection.KList;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.Optional;
+import java.util.WeakHashMap;
+
+/**
+ * The object placements and procedural objects a region or biome declares, as Iris places them: the module settings of
+ * {@code iris:objects}, made into Iris's own placements once and kept for as long as the settings live.
+ */
+public final class ObjectPlacements {
+ private static final Map PLACEMENTS = Collections.synchronizedMap(new WeakHashMap<>());
+ private static final Map PROCEDURAL = Collections.synchronizedMap(new WeakHashMap<>());
+
+ private ObjectPlacements() {
+ }
+
+ /** Every placement {@code owner} declares. */
+ public static KList all(IrisRegistrant owner) {
+ return placementsOf(owner).all;
+ }
+
+ /** The placements of {@code owner} that place on the surface. */
+ public static KList surface(IrisRegistrant owner) {
+ return placementsOf(owner).surface;
+ }
+
+ /** The placements of {@code owner} that place in carvings. */
+ public static KList carving(IrisRegistrant owner) {
+ return placementsOf(owner).carving;
+ }
+
+ /** The procedural objects {@code owner} declares; none when it declares none. */
+ public static ResolvedProceduralObjects procedural(IrisRegistrant owner) {
+ Optional settings = owner.getModuleSettings().find(ProceduralObjectSettings.class);
+ return PROCEDURAL.computeIfAbsent(settings.orElse(NO_PROCEDURAL_OBJECTS), ResolvedProceduralObjects::new);
+ }
+
+ /** Whether {@code dimension} places its objects in the terrain stacked above it too. */
+ public static boolean upperObjects(IrisRegistrant dimension) {
+ return dimension.getModuleSettings().find(UpperObjectsSettings.class).map(UpperObjectsSettings::enabled).orElse(false);
+ }
+
+ /** Whether the objects placed in the terrain stacked above ignore placement restrictions. */
+ public static boolean upperObjectsForced(IrisRegistrant dimension) {
+ return dimension.getModuleSettings().find(UpperObjectsForceSettings.class).map(UpperObjectsForceSettings::force).orElse(false);
+ }
+
+ /** Whether {@code dimension} refuses surface objects over carved openings. */
+ public static boolean requiresSurfaceSupport(IrisRegistrant dimension) {
+ return dimension.getModuleSettings().find(RequireSurfaceSupportSettings.class).map(RequireSurfaceSupportSettings::require)
+ .orElse(NO_SURFACE_SUPPORT_REQUIREMENT.require());
+ }
+
+ /** The least surface-support buffer {@code dimension} gives its surface objects. */
+ public static int surfaceSupportBuffer(IrisRegistrant dimension) {
+ return dimension.getModuleSettings().find(SurfaceSupportBufferSettings.class).map(SurfaceSupportBufferSettings::buffer)
+ .orElse(NO_SURFACE_SUPPORT_BUFFER.buffer());
+ }
+
+ /** The tree growth settings of {@code dimension}. */
+ public static TreeGrowthSettings treeGrowth(IrisRegistrant dimension) {
+ return dimension.getModuleSettings().find(TreeGrowthSettings.class).orElse(NO_TREE_GROWTH);
+ }
+
+ /** Iris's placement for the settings {@code placement}, read from the JSON it was written as. */
+ public static IrisObjectPlacement host(ObjectPlacement placement, IrisData data) {
+ Object kept = placement.hostForm();
+ if (kept instanceof IrisObjectPlacement hostPlacement) {
+ return hostPlacement;
+ }
+ IrisObjectPlacement made = data.getGson().fromJson(placement.json(), IrisObjectPlacement.class);
+ placement.hostForm(made);
+ return made;
+ }
+
+ private static final ProceduralObjectSettings NO_PROCEDURAL_OBJECTS = new ProceduralObjectSettings();
+ private static final RequireSurfaceSupportSettings NO_SURFACE_SUPPORT_REQUIREMENT = new RequireSurfaceSupportSettings();
+ private static final SurfaceSupportBufferSettings NO_SURFACE_SUPPORT_BUFFER = new SurfaceSupportBufferSettings();
+ private static final TreeGrowthSettings NO_TREE_GROWTH = new TreeGrowthSettings();
+ private static final ObjectSettings NO_OBJECTS = new ObjectSettings();
+
+ private static Placements placementsOf(IrisRegistrant owner) {
+ ObjectSettings settings = owner.getModuleSettings().find(ObjectSettings.class).orElse(NO_OBJECTS);
+ Placements found = PLACEMENTS.get(settings);
+ if (found != null) {
+ return found;
+ }
+ return PLACEMENTS.computeIfAbsent(settings, declared -> new Placements(declared, owner.getLoader()));
+ }
+
+ private record Placements(KList all, KList surface, KList carving) {
+ Placements(ObjectSettings settings, IrisData data) {
+ this(new KList<>(), new KList<>(), new KList<>());
+ for (ObjectPlacement declared : settings.objects()) {
+ IrisObjectPlacement placement = host(declared, data);
+ all.add(placement);
+ if (placement.getCarvingSupport().supportsSurface()) {
+ surface.add(placement);
+ }
+ if (placement.getCarvingSupport().supportsCarving()) {
+ carving.add(placement);
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/art/arcane/iris/engine/object/procedural/IrisProceduralObjects.java b/src/main/java/art/arcane/iris/engine/object/procedural/IrisProceduralObjects.java
deleted file mode 100644
index eb594c1d0..000000000
--- a/src/main/java/art/arcane/iris/engine/object/procedural/IrisProceduralObjects.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * 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 .
- */
-
-package art.arcane.iris.engine.object.procedural;
-
-import art.arcane.iris.builtin.objects.ruin.Ruin;
-import art.arcane.iris.engine.object.procedural.ruin.ResolvedRuin;
-import art.arcane.iris.builtin.objects.fungi.Fungus;
-import art.arcane.iris.engine.object.procedural.fungi.ResolvedFungus;
-import art.arcane.iris.builtin.objects.formation.Formation;
-import art.arcane.iris.engine.object.procedural.formation.ResolvedFormation;
-import art.arcane.iris.builtin.objects.crystal.Crystal;
-import art.arcane.iris.engine.object.procedural.crystal.ResolvedCrystal;
-import art.arcane.iris.builtin.objects.coral.Coral;
-import art.arcane.iris.engine.object.procedural.coral.ResolvedCoral;
-import art.arcane.iris.engine.object.procedural.tree.IrisProceduralTree;
-import art.arcane.iris.engine.object.annotations.ArrayType;
-import art.arcane.iris.engine.object.annotations.Desc;
-import art.arcane.iris.engine.object.annotations.Snippet;
-import art.arcane.volmlib.util.collection.KList;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.function.Function;
-import lombok.AllArgsConstructor;
-import lombok.AccessLevel;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.Getter;
-import lombok.Setter;
-import lombok.NoArgsConstructor;
-import lombok.experimental.Accessors;
-
-@Snippet("procedural-objects")
-@Accessors(chain = true)
-@NoArgsConstructor
-@AllArgsConstructor
-@Desc("Procedurally generated objects placed in a biome or region. Unlike the objects block (which loads iob files), these are generated from scratch at world-gen time.")
-@Data
-public class IrisProceduralObjects {
- @Getter(AccessLevel.NONE)
- @Setter(AccessLevel.NONE)
- @EqualsAndHashCode.Exclude
- private final transient Map