- * The module owns the pack's structures, jigsaw pools and jigsaw pieces as resource kinds - * ({@link StructureResources}), read from the folders packs have always used, and checks them with - * {@link StructureValidator} wherever Iris validates a pack. It lets Iris find its structures through - * {@link StructureLocating}; a world's structure index lives in the world's state, so a reload of the pack's structure - * files, which starts a new world, builds it again. - *
- * It decides over the platform's own structures through its {@link VanillaStructures} provider
- * ({@link StructureVanillaStructures}): the dimension's {@code importedStructures} settings disable, move, fit and set
- * them up, and the pack's structure placements replace them, place them alongside, start them where their
- * {@code nativeStructures} grids say and fit them into the terrain. The pack's structure placements are its
- * {@code "structures"} settings ({@link StructurePlacementSettings}) of the dimension, its regions and biomes.
+ * Module {@code iris:structure}: the structure placements a pack declares, and the mantle stage that places the jigsaw
+ * structures starting in each chunk. Iris builds and places the structures ({@link StructureHost}); the structure
+ * resources, their validation, the locator and the platform structure answers are Iris's own module
+ * {@code iris:structure-model}.
*/
public final class StructureModule implements IrisModule {
private static final String VERSION = "built-in";
- private ModuleLog log;
-
@Override
public ModuleInfo info() {
return ModuleInfo.of("iris:structure", "Structures", VERSION);
@@ -68,30 +46,20 @@ public final class StructureModule implements IrisModule {
@Override
public void install(StageGraph graph) {
graph.define(IrisStages.Structure.PLACE).softAfter(IrisStages.Objects.PLACE.ref(), IrisStages.Floating.OBJECTS.ref())
- .reach(this::reach).run(StructureModule::place);
+ .reach(StructureModule::reach).run(StructureModule::place);
}
@Override
public void register(FeatureRegistry registry) {
- log = registry.log();
registry.registerSettings(StructureSettings.class);
registry.registerSettings(StructurePlacementSettings.class);
- StructureResources.kinds().forEach(registry::registerResourceKind);
- registry.registerValidator(new StructureValidator());
- registry.registerService(StructureLocator.class, new StructureLocating());
- registry.registerService(VanillaStructures.class, new StructureVanillaStructures());
}
private static void place(MantleStageContext context) {
- IrisMantleChunk chunk = IrisMantleChunk.current();
- placing(chunk.engine(), context.log()).place(chunk.writer(), chunk.chunkX(), chunk.chunkZ(), chunk.context());
+ StructureHost.of(context.world()).placeChunk();
}
- private int reach(PackSettings settings) {
- return placing(IrisPackSettings.of(settings).engine(), log).reach();
- }
-
- private static StructurePlacing placing(Engine engine, ModuleLog log) {
- return engine.getGeneration().state(StructurePlacing.class, generating -> new StructurePlacing(generating, log));
+ private static int reach(PackSettings settings) {
+ return StructureHost.of(settings).reach();
}
}
diff --git a/src/main/java/art/arcane/iris/engine/object/terrain/carving/CaveProfiles.java b/src/main/java/art/arcane/iris/engine/object/terrain/carving/CaveProfiles.java
deleted file mode 100644
index 55628bb16..000000000
--- a/src/main/java/art/arcane/iris/engine/object/terrain/carving/CaveProfiles.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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