Merge branch 'wave3/l'

# Conflicts:
#	src/main/java/art/arcane/iris/engine/object/world/biome/IrisBiome.java
#	src/main/java/art/arcane/iris/engine/object/world/dimension/IrisDimension.java
#	src/main/java/art/arcane/iris/engine/object/world/region/IrisRegion.java
This commit is contained in:
piexel committed 2026-10-10 13:05:31 +02:00
commit 95a086f3e0
63 files changed
+2288 -1906

No files matched your search

@@ -0,0 +1,73 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.loot;
import com.volmit.block.BlockSpec;
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;
@Snippet("block-drops")
@Desc("Represents a block drop list")
public final class BlockDrop {
@Required
@MinItems(1)
@Desc("The blocks that drop loot")
private List<BlockSpec> blocks = List.of();
@Desc("If exact blocks is set to true, minecraft:barrel[axis=x] will only drop for that axis. When exact is false (default) any barrel will drop the defined drops.")
private boolean exactBlocks = false;
@MinItems(1)
@Desc("Add in specific items to drop")
private List<LootEntry> drops = List.of();
@Desc("If this is in a biome, setting skipParents to true will ignore the drops in the region and dimension for this block type. The default (false) will allow all three nodes to fire and add to a list of drops.")
private boolean skipParents = false;
@Desc("Removes the default vanilla block drops and only drops the given items & any parent loot tables specified for this block type.")
private boolean replaceVanillaDrops = false;
public BlockDrop() {
}
public List<BlockSpec> blocks() {
return blocks == null ? List.of() : Collections.unmodifiableList(blocks);
}
public boolean exactBlocks() {
return exactBlocks;
}
public List<LootEntry> drops() {
return drops == null ? List.of() : Collections.unmodifiableList(drops);
}
public boolean skipParents() {
return skipParents;
}
public boolean replaceVanillaDrops() {
return replaceVanillaDrops;
}
}
@@ -0,0 +1,48 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.loot;
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 block drops one dimension, region or biome declares, written as {@code "blockDrops": [...]}, the list of
* {@link BlockDrop}s. A broken block drops those of its biome, then, unless one of them skips its parents, those of its
* region and dimension.
*/
@Desc("Define custom block drops for this area")
@Feature(id = "iris:loot/drops", name = "Block drops", key = "blockDrops", root = "drops", targets = {Target.DIMENSION, Target.REGION, Target.BIOME})
public final class BlockDropSettings implements IrisFeature {
@MinItems(1)
@Desc("Define custom block drops for this area")
private List<BlockDrop> drops = List.of();
public BlockDropSettings() {
}
public List<BlockDrop> drops() {
return drops == null ? List.of() : Collections.unmodifiableList(drops);
}
}
@@ -0,0 +1,78 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.loot;
import com.volmit.config.Desc;
import com.volmit.config.MaxNumber;
import com.volmit.config.MinNumber;
import com.volmit.config.Required;
import com.volmit.config.Snippet;
@Snippet("attribute-modifier")
@Desc("Represents an attribute modifier for an item or an entity. This allows you to create modifications to basic game attributes such as MAX_HEALTH or ARMOR_VALUE.")
public final class ItemAttributeModifier {
@Required
@Desc("The Attribute type key such as max_health or minecraft:armor. This type is pulled from the game attributes. Zombie & Horse attributes will not work on non-zombie/horse entities.\nUsing an attribute on an item will have affects when held, or worn. There is no way to specify further granularity as the game picks this depending on the item type.")
private String attribute = null;
@Required
@Desc("The Attribute Name is used internally only for the game. This value should be unique to all other attributes applied to this item/entity. It is not shown in game.")
private String name = "";
@Desc("The application operation: ADD_NUMBER (default), ADD_SCALAR or MULTIPLY_SCALAR_1. Add Number adds to the default value. \nAdd scalar_1 will multiply by 1 for example if the health is 20 and you multiply_scalar_1 by 0.5, the health will result in 30, not 10. Use negative values to achieve that.")
private String operation = "ADD_NUMBER";
@Desc("Minimum amount for this modifier. Iris randomly chooses an amount, this is the minimum it can choose randomly for this attribute.")
private double minAmount = 1;
@Desc("Maximum amount for this modifier Iris randomly chooses an amount, this is the maximum it can choose randomly for this attribute.")
private double maxAmount = 1;
@MinNumber(0)
@MaxNumber(1)
@Desc("The chance that this attribute is applied (0 to 1). If the chance is 0.5 (50%), then Iris will only apply this attribute 50% of the time.")
private double chance = 1;
public ItemAttributeModifier() {
}
public String attribute() {
return attribute;
}
public String name() {
return name;
}
public String operation() {
return operation;
}
public double minAmount() {
return minAmount;
}
public double maxAmount() {
return maxAmount;
}
public double chance() {
return chance;
}
}
@@ -0,0 +1,68 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.loot;
import com.volmit.config.Desc;
import com.volmit.config.MaxNumber;
import com.volmit.config.MinNumber;
import com.volmit.config.Ref;
import com.volmit.config.Reference;
import com.volmit.config.Required;
import com.volmit.config.Snippet;
@Snippet("enchantment")
@Desc("Represents an enchantment & level")
public final class LootEnchantment {
@Required
@Ref(Reference.ENCHANTMENT)
@Desc("The enchantment")
private String enchantment;
@MinNumber(1)
@Desc("Minimum amount of this loot")
private int minLevel = 1;
@MinNumber(1)
@Desc("Maximum amount of this loot")
private int maxLevel = 1;
@MinNumber(0)
@MaxNumber(1)
@Desc("The chance that this enchantment is applied (0 to 1)")
private double chance = 1;
public LootEnchantment() {
}
public String enchantment() {
return enchantment;
}
public int minLevel() {
return minLevel;
}
public int maxLevel() {
return maxLevel;
}
public double chance() {
return chance;
}
}
@@ -0,0 +1,181 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.loot;
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.Map;
@Snippet("loot")
@Desc("Represents a loot entry")
public final class LootEntry {
public static final int MAX_AMOUNT = 64;
@Desc("The target inventory slot types to fill this loot with. World generation only ever fills STORAGE; the other values are inert during worldgen.")
private LootSlot slotTypes = LootSlot.STORAGE;
@MinNumber(1)
@Desc("The sub rarity of this loot. Calculated after this loot table has been picked.")
private int rarity = 1;
@MinNumber(1)
@MaxNumber(MAX_AMOUNT)
@Desc("Minimum amount of this loot, from 1 to 64")
private int minAmount = 1;
@MinNumber(1)
@MaxNumber(MAX_AMOUNT)
@Desc("Maximum amount of this loot, from 1 to 64")
private int maxAmount = 1;
@Desc("The display name of this item")
private String displayName = null;
@MinNumber(0)
@MaxNumber(1)
@Desc("Minimum durability percent")
private double minDurability = 0;
@MinNumber(0)
@MaxNumber(1)
@Desc("Maximum durability percent")
private double maxDurability = 1;
@Desc("Define a custom model identifier 1.14+ only")
private Integer customModel = null;
@Desc("Set this to true to prevent it from being broken")
private boolean unbreakable = false;
@MinItems(1)
@Desc("The item flags to add")
private List<String> itemFlags = List.of();
@MinItems(1)
@Desc("Apply enchantments to this item")
private List<LootEnchantment> enchantments = List.of();
@MinItems(1)
@Desc("Apply attribute modifiers to this item")
private List<ItemAttributeModifier> attributes = List.of();
@MinItems(1)
@Desc("Add lore to this item")
private List<String> lore = List.of();
@Ref(Reference.ITEM)
@Required
@Desc("This is the item or block type. Does not accept minecraft:*, only materials such as DIAMOND_SWORD or DIRT. The exception are modded materials, as they require a namespace.")
private String type = "";
@Desc("The dye color")
private String dyeColor = null;
@Desc("The leather armor color")
private String leatherColor = null;
@Desc("Defines a custom NBT Tag for the item.")
private Map<String, Object> customNbt;
public LootEntry() {
}
public LootSlot slotTypes() {
return slotTypes == null ? LootSlot.STORAGE : slotTypes;
}
public int rarity() {
return rarity;
}
public int minAmount() {
return minAmount;
}
public int maxAmount() {
return maxAmount;
}
public String displayName() {
return displayName;
}
public double minDurability() {
return minDurability;
}
public double maxDurability() {
return maxDurability;
}
public Integer customModel() {
return customModel;
}
public boolean unbreakable() {
return unbreakable;
}
public List<String> itemFlags() {
return listOrEmpty(itemFlags);
}
public List<LootEnchantment> enchantments() {
return listOrEmpty(enchantments);
}
public List<ItemAttributeModifier> attributes() {
return listOrEmpty(attributes);
}
public List<String> lore() {
return listOrEmpty(lore);
}
/** The authored item key, exactly as written in the pack. Each platform resolves it against its own item registry. */
public String type() {
return type;
}
public String dyeColor() {
return dyeColor;
}
public String leatherColor() {
return leatherColor;
}
/** The custom data of the item; empty when unset. */
public Map<String, Object> customNbt() {
return customNbt == null ? Map.of() : Collections.unmodifiableMap(customNbt);
}
private static <T> List<T> listOrEmpty(List<T> list) {
return list == null ? List.of() : Collections.unmodifiableList(list);
}
}
@@ -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 <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.loot;
import com.volmit.config.Desc;
@Desc("A loot mode is used to describe what to do with the existing loot layers before adding this loot. ADD appends to the building list of tables (dimension tables, then region tables, then biome tables). REPLACE swaps the parent tables for this reference's tables. CLEAR suppresses loot entirely at this point.")
public enum LootMode {
@Desc("Add to the existing parent loot tables")
ADD,
@Desc("Clear all parent loot tables and contribute nothing at this level. Any tables listed here are ignored.")
CLEAR,
@Desc("Replace all parent loot tables with this reference's tables")
REPLACE,
@Desc("Only use when there was no loot table defined by an object")
FALLBACK
}
@@ -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 <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.loot;
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;
import com.volmit.config.ResourceRef;
import com.volmit.config.Snippet;
import java.util.Collections;
import java.util.List;
/**
* The loot tables one dimension, region or biome adds to the containers it covers, written as
* {@code "loot": {"mode": "ADD", "tables": [...], "multiplier": 1}}. Levels stack, dimension first, then region and
* biome; {@link LootMode} says what each does with the tables before it. An entity's {@code loot} has the same shape.
*/
@Snippet("loot-registry")
@Desc("Reference loot tables in this area")
@Feature(id = "iris:loot", name = "Loot", key = "loot", targets = {Target.DIMENSION, Target.REGION, Target.BIOME})
public final class LootSettings implements IrisFeature {
public static final double MAX_MULTIPLIER = 16D;
@Desc("ADD = add on top of parent tables. REPLACE = clear parent tables, then add these. CLEAR = clear parent tables and add nothing, even if tables are listed. FALLBACK = only used when nothing else defined a table.")
private LootMode mode = LootMode.ADD;
@ResourceRef(LootTable.class)
@Desc("Add loot table registries here")
private List<String> tables = List.of();
@MinNumber(0)
@MaxNumber(MAX_MULTIPLIER)
@Desc("Scale loot sources in this area from 0 to 16 times their normal count")
private double multiplier = 1D;
/** Nothing added, nothing scaled: what a level without loot settings means. */
public LootSettings() {
}
public LootMode mode() {
return mode == null ? LootMode.ADD : mode;
}
/** The keys of the loot tables, in order. */
public List<String> tables() {
return tables == null ? List.of() : Collections.unmodifiableList(tables);
}
public double multiplier() {
return multiplier;
}
}
@@ -0,0 +1,38 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.loot;
import com.volmit.config.Desc;
@Desc("An inventory slot type is used to represent a type of slot for items to fit into in any given inventory.")
public enum LootSlot {
@Desc("Typically the one you want to go with. Storage represnents most slots in inventories.")
STORAGE,
@Desc("Used for the fuel slot in Furnaces, Blast furnaces, smokers etc.")
FUEL,
@Desc("Used for the cook slot in furnaces")
FURNACE,
@Desc("Used for the cook slot in blast furnaces")
BLAST_FURNACE,
@Desc("Used for the cook slot in smokers")
SMOKER,
}
@@ -0,0 +1,89 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.loot;
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 java.util.Collections;
import java.util.List;
/** A loot table of the pack, one file of {@code loot/}. */
@Desc("Represents a loot table. Biomes, Regions & Objects can add or replace the virtual table with these loot tables")
public final class LootTable {
public static final int MAX_PICKED = 64;
public static final int MAX_TRIES = 256;
@Required
@Desc("The name of this loot table")
private String name = "";
@MinNumber(1)
@Desc("The rarity as in 1 in X chance")
private int rarity = 1;
@MinNumber(1)
@MaxNumber(MAX_PICKED)
@Desc("The maximum amount of loot that can be picked in this table at a time, from 1 to 64")
private int maxPicked = 5;
@MinNumber(0)
@MaxNumber(MAX_PICKED)
@Desc("The minimum amount of loot that can be picked in this table at a time, from 0 to 64")
private int minPicked = 1;
@MinNumber(1)
@MaxNumber(MAX_TRIES)
@Desc("The maximum amount of tries to generate loot, from 1 to 256")
private int maxTries = 10;
@MinItems(1)
@Desc("The loot in this table")
private List<LootEntry> loot = List.of();
public LootTable() {
}
public String name() {
return name == null ? "" : name;
}
public int rarity() {
return rarity;
}
public int maxPicked() {
return maxPicked;
}
public int minPicked() {
return minPicked;
}
public int maxTries() {
return maxTries;
}
public List<LootEntry> loot() {
return loot == null ? List.of() : Collections.unmodifiableList(loot);
}
}
@@ -0,0 +1,247 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.spawn;
import com.volmit.config.Desc;
import com.volmit.config.MaxNumber;
import com.volmit.config.MinNumber;
import com.volmit.config.Ref;
import com.volmit.config.Reference;
import com.volmit.config.Required;
import com.volmit.config.Snippet;
/**
* A sound, particles, potion effect or commands that play now and then around the players in an area. The same
* settings make the effect an entity shows when it appears ({@link EntityDefinition#spawnEffect()}).
*/
@Snippet("effect")
@Desc("An iris effect")
public final class AmbientEffect {
@Ref(Reference.POTION_EFFECT)
@Desc("The potion effect to apply in this area")
private String potionEffect = "";
@Desc("The particle effect to apply in the area")
private String particleEffect = null;
@MinNumber(-32)
@MaxNumber(32)
@Desc("Randomly offset from the surface to this surface+value")
private int particleOffset = 0;
@MinNumber(-8)
@MaxNumber(8)
@Desc("The alt x, usually represents motion if the particle count is zero. Otherwise an offset.")
private double particleAltX = 0;
@MinNumber(-8)
@MaxNumber(8)
@Desc("The alt y, usually represents motion if the particle count is zero. Otherwise an offset.")
private double particleAltY = 0;
@MinNumber(-8)
@MaxNumber(8)
@Desc("The alt z, usually represents motion if the particle count is zero. Otherwise an offset.")
private double particleAltZ = 0;
@Desc("Randomize the altX by -altX to altX")
private boolean randomAltX = true;
@Desc("Randomize the altY by -altY to altY")
private boolean randomAltY = false;
@Desc("Randomize the altZ by -altZ to altZ")
private boolean randomAltZ = true;
@Desc("The sound to play")
private String sound = null;
@MinNumber(0)
@MaxNumber(512)
@Desc("The max distance from the player the sound will play")
private int soundDistance = 12;
@MinNumber(0.01)
@MaxNumber(1.99)
@Desc("The minimum sound pitch")
private double minPitch = 0.5D;
@MinNumber(0.01)
@MaxNumber(1.99)
@Desc("The max sound pitch")
private double maxPitch = 1.5D;
@MinNumber(0.001)
@MaxNumber(512)
@Desc("The sound volume.")
private double volume = 1.5D;
@MinNumber(0)
@MaxNumber(512)
@Desc("The particle count. Try setting to zero for using the alt xyz to a motion value instead of an offset")
private int particleCount = 0;
@MinNumber(0)
@MaxNumber(64)
@Desc("How far away from the player particles can play")
private int particleDistance = 20;
@MinNumber(0)
@MaxNumber(128)
@Desc("How wide the particles can play (player's view left and right) RADIUS")
private int particleDistanceWidth = 24;
@Desc("An extra value for some particles... Which bukkit doesn't even document.")
private double extra = 0;
@MinNumber(-1)
@MaxNumber(1024)
@Desc("The Potion Strength or -1 to disable")
private int potionStrength = -1;
@MinNumber(1)
@Desc("The max time the potion will last for")
private int potionTicksMax = 155;
@MinNumber(1)
@Desc("The min time the potion will last for")
private int potionTicksMin = 75;
@Required
@MinNumber(0)
@Desc("The effect interval in milliseconds")
private int interval = 150;
@MinNumber(0)
@MaxNumber(16)
@Desc("The effect distance start away")
private int particleAway = 5;
@Required
@MinNumber(1)
@Desc("The chance is 1 in CHANCE per interval")
private int chance = 50;
@Desc("Run commands, with configurable location parameters")
private EffectCommands commandRegistry = null;
public AmbientEffect() {
}
public String potionEffect() {
return potionEffect;
}
public String particleEffect() {
return particleEffect;
}
public int particleOffset() {
return particleOffset;
}
public double particleAltX() {
return particleAltX;
}
public double particleAltY() {
return particleAltY;
}
public double particleAltZ() {
return particleAltZ;
}
public boolean randomAltX() {
return randomAltX;
}
public boolean randomAltY() {
return randomAltY;
}
public boolean randomAltZ() {
return randomAltZ;
}
public String sound() {
return sound;
}
public int soundDistance() {
return soundDistance;
}
public double minPitch() {
return minPitch;
}
public double maxPitch() {
return maxPitch;
}
public double volume() {
return volume;
}
public int particleCount() {
return particleCount;
}
public int particleDistance() {
return particleDistance;
}
public int particleDistanceWidth() {
return particleDistanceWidth;
}
public double extra() {
return extra;
}
public int potionStrength() {
return potionStrength;
}
public int potionTicksMax() {
return potionTicksMax;
}
public int potionTicksMin() {
return potionTicksMin;
}
public int interval() {
return interval;
}
public int particleAway() {
return particleAway;
}
public int chance() {
return chance;
}
/** The commands the effect runs; null for none. */
public EffectCommands commandRegistry() {
return commandRegistry;
}
}
@@ -0,0 +1,100 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.spawn;
import com.volmit.config.Desc;
import com.volmit.config.MaxNumber;
import com.volmit.config.MinItems;
import com.volmit.config.MinNumber;
import com.volmit.config.Required;
import com.volmit.config.Snippet;
import java.util.Collections;
import java.util.List;
@Snippet("command-registry")
@Desc("Represents a casting location for a command")
public final class EffectCommands {
@Required
@MinItems(1)
@Desc("Run commands, at the exact location of the player")
private List<SpawnCommand> rawCommands = List.of();
@MinNumber(-8)
@MaxNumber(8)
@Desc("The alt x, usually represents motion if the particle count is zero. Otherwise an offset.")
private double commandOffsetX = 0;
@MinNumber(-8)
@MaxNumber(8)
@Desc("The alt y, usually represents motion if the particle count is zero. Otherwise an offset.")
private double commandOffsetY = 0;
@MinNumber(-8)
@MaxNumber(8)
@Desc("The alt z, usually represents motion if the particle count is zero. Otherwise an offset.")
private double commandOffsetZ = 0;
@Desc("Randomize the altX from -altX to altX")
private boolean commandRandomAltX = true;
@Desc("Randomize the altY from -altY to altY")
private boolean commandRandomAltY = false;
@Desc("Randomize the altZ from -altZ to altZ")
private boolean commandRandomAltZ = true;
@Desc("Randomize location for all separate commands (true), or run all on the same location (false)")
private boolean commandAllRandomLocations = true;
public EffectCommands() {
}
public List<SpawnCommand> rawCommands() {
return rawCommands == null ? List.of() : Collections.unmodifiableList(rawCommands);
}
public double commandOffsetX() {
return commandOffsetX;
}
public double commandOffsetY() {
return commandOffsetY;
}
public double commandOffsetZ() {
return commandOffsetZ;
}
public boolean commandRandomAltX() {
return commandRandomAltX;
}
public boolean commandRandomAltY() {
return commandRandomAltY;
}
public boolean commandRandomAltZ() {
return commandRandomAltZ;
}
public boolean commandAllRandomLocations() {
return commandAllRandomLocations;
}
}
@@ -0,0 +1,47 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.spawn;
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 ambient effects one region or biome declares, written as {@code "effects": [...]}, the list of
* {@link AmbientEffect}s. They play around every player in the area.
*/
@Desc("Effects are ambient effects such as potion effects, random sounds, or even particles around each player. All of these effects are played via packets so two players won't see/hear each others effects.\nDue to performance reasons, effects will play arround the player even if where the effect was played is no longer in the biome the player is in.")
@Feature(id = "iris:spawn/effects", name = "Effects", key = "effects", root = "effects", targets = {Target.REGION, Target.BIOME})
public final class EffectSettings implements IrisFeature {
@MinItems(1)
@Desc("Effects are ambient effects such as potion effects, random sounds, or even particles around each player.")
private List<AmbientEffect> effects = List.of();
public EffectSettings() {
}
public List<AmbientEffect> effects() {
return effects == null ? List.of() : Collections.unmodifiableList(effects);
}
}
@@ -0,0 +1,274 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.spawn;
import art.arcane.iris.builtin.loot.ItemAttributeModifier;
import art.arcane.iris.builtin.loot.LootEntry;
import art.arcane.iris.builtin.loot.LootSettings;
import com.volmit.config.Desc;
import com.volmit.config.MinItems;
import com.volmit.config.Ref;
import com.volmit.config.Reference;
import com.volmit.config.Required;
import java.util.Collections;
import java.util.List;
/** An entity of the pack, one file of {@code entities/}: what spawners and markers spawn, with its equipment, attributes, passengers and loot. */
@Desc("Represents an iris entity.")
public final class EntityDefinition {
@Required
@Ref(Reference.ENTITY)
@Desc("The namespaced key of the entity type to spawn, such as minecraft:zombie or alexsmobs:grizzly_bear. To spawn a mob from another plugin or provider, set this type to unknown and define the special type.")
private String type = null;
@Desc("The SpawnReason name to spawn the entity with, such as NATURAL or COMMAND.")
private String reason = null;
@Desc("The custom name of this entity")
private String customName = "";
@Desc("Should the name on this entity be visible even if you arent looking at it.")
private boolean customNameVisible = false;
@Desc("If this entity type is a mob, should it be aware of it's surroundings & interact with the world.")
private boolean aware = true;
@Desc("If this entity type is a creature, should it have ai goals.")
private boolean ai = true;
@Desc("Should this entity be glowing")
private boolean glowing = false;
@Desc("Should gravity apply to this entity")
private boolean gravity = true;
@Desc("When an entity is invulnerable it can only be damaged by players increative mode.")
private boolean invulnerable = false;
@Desc("When an entity is silent it will not produce any sound.")
private boolean silent = false;
@Desc("Should this entity be allowed to pickup items")
private boolean pickupItems = false;
@Desc("Should this entity be removed when far away")
private boolean removable = false;
@Desc("Entity helmet equipment")
private LootEntry helmet = null;
@Desc("Entity chestplate equipment")
private LootEntry chestplate = null;
@Desc("Entity boots equipment")
private LootEntry boots = null;
@Desc("Entity leggings equipment")
private LootEntry leggings = null;
@Desc("Entity main hand equipment")
private LootEntry mainHand = null;
@Desc("Entity off hand equipment")
private LootEntry offHand = null;
@MinItems(1)
@Desc("Make other entities ride this entity")
private List<EntityDefinition> passengers = List.of();
@MinItems(1)
@Desc("Attribute modifiers for this entity")
private List<ItemAttributeModifier> attributes = List.of();
@Desc("Loot tables for drops. Only the tables list is honored for entities; mode and multiplier are ignored, and the tables replace vanilla drops entirely.")
private LootSettings loot = new LootSettings();
@Desc("If specified, this entity will be leashed by this entity. I.e. THIS ENTITY Leashed by SPECIFIED. This has no effect on EnderDragons, Withers, Players, or Bats.Non-living entities excluding leashes will not persist as leashholders.")
private EntityDefinition leashHolder = null;
@Desc("If specified, this entity will spawn with an effect")
private AmbientEffect spawnEffect = null;
@Desc("Simply moves the entity from below the surface slowly out of the ground as a spawn-in effect")
private boolean spawnEffectRiseOutOfGround = false;
@Desc("The main gene for a panda if the entity type is a panda. One of NORMAL, LAZY, WORRIED, PLAYFUL, BROWN, WEAK or AGGRESSIVE.")
private String pandaMainGene = null;
@Desc("The hidden gene for a panda if the entity type is a panda. One of NORMAL, LAZY, WORRIED, PLAYFUL, BROWN, WEAK or AGGRESSIVE.")
private String pandaHiddenGene = null;
@Desc("The this entity is ageable, set it's baby status")
private boolean baby = false;
@Desc("If the entity should never be culled.")
private boolean keepEntity = false;
@Desc("The surface type to spawn this mob on")
private SpawnSurface surface = SpawnSurface.LAND;
@Ref(Reference.SPECIAL_ENTITY)
@Desc("Create a mob from another plugin, such as Mythic Mobs. Should be in the format of a namespace of PluginName:MobName")
private String specialType = "";
@Desc("Set to true if you want to apply all of the settings here to the mob, even though an external plugin has already done so.")
private boolean applySettingsToCustomMobAnyways = false;
@MinItems(1)
@Desc("Run raw commands when this entity is spawned. Use {x}, {y}, and {z} for location. /summon pig {x} {y} {z}")
private List<SpawnCommand> rawCommands = List.of();
public EntityDefinition() {
}
public String type() {
return type;
}
public String reason() {
return reason;
}
public String customName() {
return customName;
}
public boolean customNameVisible() {
return customNameVisible;
}
public boolean aware() {
return aware;
}
public boolean ai() {
return ai;
}
public boolean glowing() {
return glowing;
}
public boolean gravity() {
return gravity;
}
public boolean invulnerable() {
return invulnerable;
}
public boolean silent() {
return silent;
}
public boolean pickupItems() {
return pickupItems;
}
public boolean removable() {
return removable;
}
public LootEntry helmet() {
return helmet;
}
public LootEntry chestplate() {
return chestplate;
}
public LootEntry boots() {
return boots;
}
public LootEntry leggings() {
return leggings;
}
public LootEntry mainHand() {
return mainHand;
}
public LootEntry offHand() {
return offHand;
}
public List<EntityDefinition> passengers() {
return passengers == null ? List.of() : Collections.unmodifiableList(passengers);
}
public List<ItemAttributeModifier> attributes() {
return attributes == null ? List.of() : Collections.unmodifiableList(attributes);
}
/** The loot the entity drops when it dies; only its tables count. */
public LootSettings loot() {
return loot == null ? new LootSettings() : loot;
}
public EntityDefinition leashHolder() {
return leashHolder;
}
public AmbientEffect spawnEffect() {
return spawnEffect;
}
public boolean spawnEffectRiseOutOfGround() {
return spawnEffectRiseOutOfGround;
}
public String pandaMainGene() {
return pandaMainGene;
}
public String pandaHiddenGene() {
return pandaHiddenGene;
}
public boolean baby() {
return baby;
}
public boolean keepEntity() {
return keepEntity;
}
public SpawnSurface surface() {
return surface == null ? SpawnSurface.LAND : surface;
}
public String specialType() {
return specialType;
}
/** Whether the entity is a mob of another plugin. */
public boolean isSpecialType() {
return specialType != null && !specialType.isEmpty();
}
public boolean applySettingsToCustomMobAnyways() {
return applySettingsToCustomMobAnyways;
}
public List<SpawnCommand> rawCommands() {
return rawCommands == null ? List.of() : Collections.unmodifiableList(rawCommands);
}
}
@@ -0,0 +1,66 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.spawn;
import com.volmit.config.Desc;
import com.volmit.config.MinNumber;
import com.volmit.config.Required;
import com.volmit.config.ResourceRef;
import com.volmit.config.Snippet;
@Snippet("entity-spawn")
@Desc("Represents an entity spawn during initial chunk generation")
public final class EntitySpawn {
@ResourceRef(EntityDefinition.class)
@Required
@Desc("The entity")
private String entity = "";
@MinNumber(1)
@Desc("The 1 in RARITY chance for this entity to spawn")
private int rarity = 1;
@MinNumber(1)
@Desc("The minumum of this entity to spawn")
private int minSpawns = 1;
@MinNumber(1)
@Desc("The max of this entity to spawn")
private int maxSpawns = 1;
public EntitySpawn() {
}
/** The key of the entity of the pack. */
public String entity() {
return entity;
}
public int rarity() {
return rarity;
}
public int minSpawns() {
return minSpawns;
}
public int maxSpawns() {
return maxSpawns;
}
}
@@ -0,0 +1,78 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.spawn;
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;
@Snippet("command")
@Desc("Represents a set of Iris commands")
public final class SpawnCommand {
@Required
@MinItems(1)
@Desc("List of commands. Iris replaces {x} {y} and {z} with the location of the entity spawn")
private List<String> commands = List.of();
@Desc("The delay for running the command. Instant by default")
private long delay = 0;
@Desc("If this should be repeated (indefinitely, cannot be cancelled). This does not persist with server-restarts, so it only repeats when the chunk is generated.")
private boolean repeat = false;
@Desc("The delay between repeats, in server ticks (by default 100, so 5 seconds)")
private long repeatDelay = 100;
@Desc("The block of 24 hour time in which the command should execute.")
private SpawnTimeBlock timeBlock = new SpawnTimeBlock();
@Desc("The weather that is required for the command to execute.")
private SpawnWeather weather = SpawnWeather.ANY;
public SpawnCommand() {
}
public List<String> commands() {
return commands == null ? List.of() : Collections.unmodifiableList(commands);
}
public long delay() {
return delay;
}
public boolean repeat() {
return repeat;
}
public long repeatDelay() {
return repeatDelay;
}
public SpawnTimeBlock timeBlock() {
return timeBlock == null ? new SpawnTimeBlock() : timeBlock;
}
public SpawnWeather weather() {
return weather == null ? SpawnWeather.ANY : weather;
}
}
@@ -0,0 +1,80 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.spawn;
import com.volmit.config.Desc;
import com.volmit.config.Snippet;
import java.util.concurrent.TimeUnit;
@Snippet("duration")
@Desc("Represents a combined duration. Fill each property to add time into a single duration")
public final class SpawnDuration {
private static final long MILLISECONDS_PER_MINECRAFT_TICK = 50L;
private static final long MILLISECONDS_PER_MINECRAFT_HOUR = 50_000L;
private static final long MILLISECONDS_PER_MINECRAFT_DAY = 1_200_000L;
private static final long MILLISECONDS_PER_MINECRAFT_WEEK = 8_400_000L;
private static final long MILLISECONDS_PER_MINECRAFT_LUNAR_CYCLE = 9_600_000L;
@Desc("Milliseconds (1000ms = 1 second)")
private int milliseconds = 0;
@Desc("Minecraft Ticks (20 minecraft ticks = 1 second)")
private int minecraftTicks = 0;
@Desc("Seconds (60 seconds = 1 minute)")
private int seconds = 0;
@Desc("Minutes (60 minutes = 1 hour)")
private int minutes = 0;
@Desc("Minecraft Hours (about 50 real seconds)")
private int minecraftHours = 0;
@Desc("Hours (24 hours = 1 day)")
private int hours = 0;
@Desc("Minecraft Days (1 minecraft day = 20 real minutes)")
private int minecraftDays = 0;
@Desc("Minecraft Weeks (7 minecraft days = 2 real hours and 20 real minutes)")
private int minecraftWeeks = 0;
@Desc("Minecraft Lunar Cycles (8 minecraft days = 2 real hours and 40 real minutes)")
private int minecraftLunarCycles = 0;
@Desc("REAL (not minecraft) Days")
private int days = 0;
public SpawnDuration() {
}
public long toMilliseconds() {
return milliseconds
+ TimeUnit.SECONDS.toMillis(seconds)
+ TimeUnit.MINUTES.toMillis(minutes)
+ TimeUnit.HOURS.toMillis(hours)
+ TimeUnit.DAYS.toMillis(days)
+ (minecraftTicks * MILLISECONDS_PER_MINECRAFT_TICK)
+ (minecraftHours * MILLISECONDS_PER_MINECRAFT_HOUR)
+ (minecraftDays * MILLISECONDS_PER_MINECRAFT_DAY)
+ (minecraftWeeks * MILLISECONDS_PER_MINECRAFT_WEEK)
+ (minecraftLunarCycles * MILLISECONDS_PER_MINECRAFT_LUNAR_CYCLE);
}
}
@@ -0,0 +1,36 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.spawn;
import com.volmit.config.Desc;
@Desc("Terrain modes are used to decide the generator type currently used")
public enum SpawnGroup {
@Desc("Spawns on the terrain surface")
NORMAL,
@Desc("Spawns in cave-air and low light level areas")
CAVE,
@Desc("Spawns underwater")
UNDERWATER,
@Desc("Spawns in beaches")
BEACH
}
@@ -0,0 +1,64 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.spawn;
import com.volmit.config.Desc;
import com.volmit.config.MinItems;
import com.volmit.config.ResourceRef;
import java.util.Collections;
import java.util.List;
/** A marker of the pack, one file of {@code markers/}: object placements put markers in the world and a marker names the spawners that fire there. */
@Desc("Represents a marker")
public final class SpawnMarker {
@Desc("A list of spawners to add to anywhere this marker is.")
@ResourceRef(Spawner.class)
@MinItems(1)
private List<String> spawners = List.of();
@Desc("Remove this marker when the block it's assigned to is changed.")
private boolean removeOnChange = true;
@Desc("If true, markers will only be placed here if there is 2 air blocks above it.")
private boolean emptyAbove = true;
@Desc("If this marker is used, what is the chance it removes itself. For example 25% (0.25) would mean that on average 4 uses will remove a specific marker. Set this below 0 (-1) to never exhaust & set this to 1 or higher to always exhaust on first use.")
private double exhaustionChance = 0;
public SpawnMarker() {
}
/** The keys of the spawners that fire at the marker. */
public List<String> spawners() {
return spawners == null ? List.of() : Collections.unmodifiableList(spawners);
}
public boolean removeOnChange() {
return removeOnChange;
}
public boolean emptyAbove() {
return emptyAbove;
}
public double exhaustionChance() {
return exhaustionChance;
}
}
@@ -0,0 +1,50 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.spawn;
import com.volmit.config.Desc;
import com.volmit.config.Snippet;
@Snippet("rate")
@Desc("Represents a count of something per time duration")
public final class SpawnRate {
@Desc("The amount of things. Leave 0 for infinite (meaning always spawn whenever)")
private int amount = 0;
@Desc("The time interval. Leave blank for infinite 0 (meaning always spawn all the time)")
private SpawnDuration per = new SpawnDuration();
public SpawnRate() {
}
/** The milliseconds between two things: the interval divided by the amount, at least 1. */
public long interval() {
long t = duration().toMilliseconds() / (amount == 0 ? 1 : amount);
return Math.abs(t <= 0 ? 1 : t);
}
/** Whether there is no limit: no interval was given. */
public boolean isInfinite() {
return duration().toMilliseconds() == 0;
}
private SpawnDuration duration() {
return per == null ? new SpawnDuration() : per;
}
}
@@ -0,0 +1,40 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.spawn;
import com.volmit.config.Desc;
@Desc("The type of surface entities should spawn on")
public enum SpawnSurface {
@Desc("Land surfaces")
LAND,
@Desc("Any surfaces animals can spawn on, such as dirt, grass and podzol")
ANIMAL,
@Desc("Within the water")
WATER,
@Desc("On land or on water")
OVERWORLD,
@Desc("Within lava")
LAVA
}
@@ -0,0 +1,50 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.spawn;
import com.volmit.config.Desc;
import com.volmit.config.Snippet;
@Snippet("time-block")
@Desc("Represents a time of day (24h time, not 12h am/pm). Set both to the same number for any time. If they are both set to -1, it will always be not allowed.")
public final class SpawnTimeBlock {
private static final double NEVER = -1;
@Desc("The beginning hour. Set both to the same number for any time. If they are both set to -1, it will always be not allowed.")
private double startHour = 0;
@Desc("The ending hour. Set both to the same number for any time. If they are both set to -1, it will always be not allowed.")
private double endHour = 0;
public SpawnTimeBlock() {
}
/** Whether {@code hour}, a time of day from 0 to 24, lies in the block; a block that wraps past midnight includes both ends. */
public boolean contains(double hour) {
if (startHour == endHour) {
return endHour != NEVER;
}
if (startHour > endHour) {
return hour >= startHour || hour <= endHour;
}
return hour >= startHour && hour <= endHour;
}
}
@@ -0,0 +1,46 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.spawn;
import com.volmit.config.Desc;
@Desc("Represents a weather type")
public enum SpawnWeather {
@Desc("Represents when weather is not causing downfall")
NONE,
@Desc("Represents rain or snow")
DOWNFALL,
@Desc("Represents rain or snow with thunder")
DOWNFALL_WITH_THUNDER,
@Desc("Any weather")
ANY;
/** Whether the weather of a world, which is {@code storming} and {@code thundering} or neither, is this one. */
public boolean matches(boolean storming, boolean thundering) {
return switch (this) {
case NONE -> !storming && !thundering;
case DOWNFALL -> storming;
case DOWNFALL_WITH_THUNDER -> storming && thundering;
case ANY -> true;
};
}
}
@@ -0,0 +1,98 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.spawn;
import com.volmit.config.Desc;
import com.volmit.config.MinItems;
import com.volmit.config.Range;
import java.util.Collections;
import java.util.List;
/** A spawner of the pack, one file of {@code spawners/}: which entities appear where, when and how often. */
@Desc("Represents an entity spawn during initial chunk generation")
public final class Spawner {
@MinItems(1)
@Desc("The entity spawns to add")
private List<EntitySpawn> spawns = List.of();
@MinItems(1)
@Desc("The entity spawns to add initially. EXECUTES PER CHUNK!")
private List<EntitySpawn> initialSpawns = List.of();
@Desc("This spawner will not spawn in a given chunk if that chunk has more than the defined amount of living entities.")
private int maxEntitiesPerChunk = 1;
@Desc("The block of 24 hour time to contain this spawn in.")
private SpawnTimeBlock timeBlock = new SpawnTimeBlock();
@Desc("The weather condition required for this spawner to fire.")
private SpawnWeather weather = SpawnWeather.ANY;
@Desc("The maximum rate this spawner can fire")
private SpawnRate maximumRate = new SpawnRate();
@Desc("The maximum rate this spawner can fire on a specific chunk")
private SpawnRate maximumRatePerChunk = new SpawnRate();
@Desc("The light levels this spawn is allowed to run in (0-15 inclusive)")
private Range allowedLightLevels = Range.of(0, 15);
@Desc("Where should these spawns be placed")
private SpawnGroup group = SpawnGroup.NORMAL;
public Spawner() {
}
public List<EntitySpawn> spawns() {
return spawns == null ? List.of() : Collections.unmodifiableList(spawns);
}
public List<EntitySpawn> initialSpawns() {
return initialSpawns == null ? List.of() : Collections.unmodifiableList(initialSpawns);
}
public int maxEntitiesPerChunk() {
return maxEntitiesPerChunk;
}
public SpawnTimeBlock timeBlock() {
return timeBlock == null ? new SpawnTimeBlock() : timeBlock;
}
public SpawnWeather weather() {
return weather == null ? SpawnWeather.ANY : weather;
}
public SpawnRate maximumRate() {
return maximumRate == null ? new SpawnRate() : maximumRate;
}
public SpawnRate maximumRatePerChunk() {
return maximumRatePerChunk == null ? new SpawnRate() : maximumRatePerChunk;
}
public Range allowedLightLevels() {
return allowedLightLevels == null ? Range.of(0, 15) : allowedLightLevels;
}
public SpawnGroup group() {
return group == null ? SpawnGroup.NORMAL : group;
}
}
@@ -0,0 +1,49 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.builtin.spawn;
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.ResourceRef;
import java.util.Collections;
import java.util.List;
/**
* The spawners one dimension, region or biome lists, written as {@code "entitySpawners": [...]}, the keys of the
* {@link Spawner}s. A chunk may fire the spawners of its dimension, region and biome.
*/
@Desc("Entity spawners that fire in this area")
@Feature(id = "iris:spawn", name = "Entity spawners", key = "entitySpawners", root = "spawners", targets = {Target.DIMENSION, Target.REGION, Target.BIOME})
public final class SpawnerSettings implements IrisFeature {
@MinItems(1)
@ResourceRef(Spawner.class)
@Desc("Entity spawners to add to this area")
private List<String> spawners = List.of();
public SpawnerSettings() {
}
public List<String> spawners() {
return spawners == null ? List.of() : Collections.unmodifiableList(spawners);
}
}