mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-27 16:25:36 +00:00
Gather built-in stage constants in one IrisStages catalogue
The 20 per-module *Stages holders become nested classes of art.arcane.iris.builtin.IrisStages, listed in pipeline order, so one file shows every built-in stage. Settings and output types stay in their per-module subpackages.
This commit is contained in:
1 parent
7a9ea0ca5a
commit
f71346d235
42 files changed
+344
-785
No files matched your search
@@ -0,0 +1,242 @@
|
||||
/*
|
||||
* 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;
|
||||
|
||||
import art.arcane.iris.builtin.anchor.AnchorHeight;
|
||||
import art.arcane.iris.builtin.blocks.WrittenBlocks;
|
||||
import art.arcane.iris.builtin.stilt.StiltLayers;
|
||||
import art.arcane.iris.engine.object.placement.IrisObjectPlacement;
|
||||
import art.arcane.iris.engine.object.placement.PreparedPlacement;
|
||||
import com.volmit.stage.BlockStage;
|
||||
import com.volmit.stage.ChunkStage;
|
||||
import com.volmit.stage.MantleStage;
|
||||
import com.volmit.stage.PlacementStage;
|
||||
import com.volmit.stage.Stage;
|
||||
|
||||
/**
|
||||
* Every stage of Iris's built-in modules, one nested class per module. Modules are listed in the order their
|
||||
* pipelines run them: placement, then mantle, then chunk; a module with stages in several pipelines is listed
|
||||
* where its first stage runs. The stage graph decides the actual order.
|
||||
*/
|
||||
public final class IrisStages {
|
||||
private IrisStages() {
|
||||
}
|
||||
|
||||
/** Module {@code iris:prepare}: what a placement decides before it looks for its height. */
|
||||
public static final class Prepare {
|
||||
/** The settings the placement uses: the requested ones, turned downhill when they ask to face the slope. Rejects {@code slope}. */
|
||||
public static final PlacementStage<IrisObjectPlacement> SLOPE = Stage.placement("iris:prepare/slope", IrisObjectPlacement.class);
|
||||
/** The random rotation, translation and height offset, chosen once per placement. */
|
||||
public static final PlacementStage<PreparedPlacement> TRANSFORMS = Stage.placement("iris:prepare/transforms", PreparedPlacement.class);
|
||||
|
||||
private Prepare() {
|
||||
}
|
||||
}
|
||||
|
||||
/** Module {@code iris:anchor}: the height an object is placed at. */
|
||||
public static final class Anchor {
|
||||
/** The requested or sampled height the checks judge. Rejects {@code carving-anchor}. */
|
||||
public static final PlacementStage<AnchorHeight> HEIGHT = Stage.placement("iris:anchor/height", AnchorHeight.class);
|
||||
/** The height the object's blocks are written at: the checked height plus the random offset. */
|
||||
public static final PlacementStage<AnchorHeight> FINAL = Stage.placement("iris:anchor/final", AnchorHeight.class);
|
||||
|
||||
private Anchor() {
|
||||
}
|
||||
}
|
||||
|
||||
/** Module {@code iris:validate}: the checks that reject a placement before anything is written, in this order. */
|
||||
public static final class Validate {
|
||||
/** Rejects {@code bedrock-anchor} and {@code surface-support}. */
|
||||
public static final PlacementStage<Void> SURFACE = Stage.placement("iris:validate/surface");
|
||||
/** Rejects {@code underwater-anchor}, {@code cave-clearance}, {@code fluid-height} and {@code height-clamp}. */
|
||||
public static final PlacementStage<Void> LIMITS = Stage.placement("iris:validate/limits");
|
||||
/** Rejects {@code native-structure}, even for placements that force their way past the other checks. */
|
||||
public static final PlacementStage<Void> STRUCTURES = Stage.placement("iris:validate/structures");
|
||||
/** Rejects {@code object-collision}. */
|
||||
public static final PlacementStage<Void> COLLISIONS = Stage.placement("iris:validate/collisions");
|
||||
|
||||
private Validate() {
|
||||
}
|
||||
}
|
||||
|
||||
/** Module {@code iris:bore}: clearing the object's volume before its blocks are written. */
|
||||
public static final class Bore {
|
||||
public static final PlacementStage<Void> CLEAR = Stage.placement("iris:bore/clear");
|
||||
|
||||
private Bore() {
|
||||
}
|
||||
}
|
||||
|
||||
/** Module {@code iris:blocks}: writing the object's blocks. */
|
||||
public static final class Blocks {
|
||||
/** Writes each object block where the placement puts it. */
|
||||
public static final BlockStage<WrittenBlocks> WRITE = Stage.placementBlock("iris:blocks/write", WrittenBlocks.class);
|
||||
/** Marks some written blocks with the placement's markers. */
|
||||
public static final PlacementStage<Void> MARKERS = Stage.placement("iris:blocks/markers");
|
||||
/** Milestone: stages requiring it run after the object and its markers are written. */
|
||||
public static final PlacementStage<Void> COMPLETE = Stage.placement("iris:blocks/complete");
|
||||
|
||||
private Blocks() {
|
||||
}
|
||||
}
|
||||
|
||||
/** Module {@code iris:stilt}: the stilts of the stilt and ceiling placement modes. */
|
||||
public static final class Stilt {
|
||||
/** Finds the layers to repeat. */
|
||||
public static final BlockStage<StiltLayers> LAYERS = Stage.placementBlock("iris:stilt/layers", StiltLayers.class);
|
||||
/** Grows the stilt once the object is written. */
|
||||
public static final PlacementStage<Void> FILL = Stage.placement("iris:stilt/fill");
|
||||
|
||||
private Stilt() {
|
||||
}
|
||||
}
|
||||
|
||||
/** Module {@code iris:vacuum}: bending the terrain to meet objects of the vacuum placement modes. */
|
||||
public static final class Vacuum {
|
||||
public static final PlacementStage<Void> TERRAIN = Stage.placement("iris:vacuum/terrain");
|
||||
|
||||
private Vacuum() {
|
||||
}
|
||||
}
|
||||
|
||||
/** Module {@code iris:snow}: snow on the object, after its stilt or terrain bend. */
|
||||
public static final class Snow {
|
||||
public static final PlacementStage<Void> COVER = Stage.placement("iris:snow/cover");
|
||||
|
||||
private Snow() {
|
||||
}
|
||||
}
|
||||
|
||||
/** Module {@code iris:carve}: caves, planned in the mantle and cut into each chunk's terrain. */
|
||||
public static final class Carve {
|
||||
/** Plans the caves of the dimension's cave profiles into the mantle, one block into each neighbor. */
|
||||
public static final MantleStage<Void> CAVES = Stage.mantle("iris:carve/caves");
|
||||
/** Cuts the planned caves out of the chunk's terrain and decorates their floors and ceilings. */
|
||||
public static final ChunkStage<Void> APPLY = Stage.chunk("iris:carve/apply");
|
||||
|
||||
private Carve() {
|
||||
}
|
||||
}
|
||||
|
||||
/** Module {@code iris:objects}: the objects the dimension's regions and biomes place. */
|
||||
public static final class Objects {
|
||||
/** Places surface, cave and upper-dimension objects into the mantle, after the caves they anchor in. */
|
||||
public static final MantleStage<Void> PLACE = Stage.mantle("iris:objects/place");
|
||||
|
||||
private Objects() {
|
||||
}
|
||||
}
|
||||
|
||||
/** Module {@code iris:floating}: the floating islands of floating child biomes. */
|
||||
public static final class Floating {
|
||||
/** Places the objects on and under the islands into the mantle, after the dimension's other objects. */
|
||||
public static final MantleStage<Void> OBJECTS = Stage.mantle("iris:floating/objects");
|
||||
/** Writes the islands' solid blocks. */
|
||||
public static final ChunkStage<Void> SOLIDS = Stage.chunk("iris:floating/solids");
|
||||
/** Decorates the islands' tops and bottoms once the chunk's own decoration is done. */
|
||||
public static final ChunkStage<Void> DECORATE = Stage.chunk("iris:floating/decorate");
|
||||
|
||||
private Floating() {
|
||||
}
|
||||
}
|
||||
|
||||
/** Module {@code iris:structure}: Iris structures, assembled from pieces. */
|
||||
public static final class Structure {
|
||||
/** Places the structures of the dimension, its regions and biomes into the mantle, after objects and floating objects. */
|
||||
public static final MantleStage<Void> PLACE = Stage.mantle("iris:structure/place");
|
||||
|
||||
private Structure() {
|
||||
}
|
||||
}
|
||||
|
||||
/** Module {@code iris:biome}: the biomes a chunk reports to the server. */
|
||||
public static final class Biome {
|
||||
/** Writes every column's biome, sky biome or custom biome, into the chunk. */
|
||||
public static final ChunkStage<Void> WRITE = Stage.chunk("iris:biome/write");
|
||||
|
||||
private Biome() {
|
||||
}
|
||||
}
|
||||
|
||||
/** Module {@code iris:terrain}: the solid ground, fluids and biome layers of a chunk. */
|
||||
public static final class Terrain {
|
||||
/** Fills each column from bedrock up to its height and the fluid height, with its biome's layers. */
|
||||
public static final ChunkStage<Void> SHAPE = Stage.chunk("iris:terrain/shape");
|
||||
|
||||
private Terrain() {
|
||||
}
|
||||
}
|
||||
|
||||
/** Module {@code iris:post}: smoothing a chunk's surface after carving. */
|
||||
public static final class Post {
|
||||
/** Fills single-block holes, places slabs and walls on steps and settles snow. */
|
||||
public static final ChunkStage<Void> SMOOTH = Stage.chunk("iris:post/smooth");
|
||||
|
||||
private Post() {
|
||||
}
|
||||
}
|
||||
|
||||
/** Module {@code iris:deposit}: ores and other deposits. */
|
||||
public static final class Deposit {
|
||||
/**
|
||||
* Places the deposits every level declares at the chunk's centre column, the dimension's, the region's and
|
||||
* the biome's, each with its own clumps. Active where any column of the chunk has deposits.
|
||||
*/
|
||||
public static final ChunkStage<Void> ORES = Stage.chunk("iris:deposit/ores");
|
||||
|
||||
private Deposit() {
|
||||
}
|
||||
}
|
||||
|
||||
/** Module {@code iris:matter}: the blocks the mantle planned for a chunk, such as objects and structures. */
|
||||
public static final class Matter {
|
||||
/** Copies the chunk's planned mantle blocks into it. */
|
||||
public static final ChunkStage<Void> INSERT = Stage.chunk("iris:matter/insert");
|
||||
|
||||
private Matter() {
|
||||
}
|
||||
}
|
||||
|
||||
/** Module {@code iris:decorant}: the decorators of biomes, such as grass, flowers and cave ceilings. */
|
||||
public static final class Decorant {
|
||||
/** Places every column's surface, sea, shore and cave decorators. */
|
||||
public static final ChunkStage<Void> DECORATE = Stage.chunk("iris:decorant/decorate");
|
||||
|
||||
private Decorant() {
|
||||
}
|
||||
}
|
||||
|
||||
/** Module {@code iris:perfection}: the last touches on an overworld chunk's blocks. */
|
||||
public static final class Perfection {
|
||||
/** Hides ores when the dimension asks, then removes decorations that nothing holds up. */
|
||||
public static final ChunkStage<Void> SURFACE = Stage.chunk("iris:perfection/surface");
|
||||
|
||||
private Perfection() {
|
||||
}
|
||||
}
|
||||
|
||||
/** Module {@code iris:custom}: blocks of content plugins, which the server places after generation. */
|
||||
public static final class Custom {
|
||||
/** Records the chunk's custom blocks so the server can place them once the chunk exists. */
|
||||
public static final ChunkStage<Void> BLOCKS = Stage.chunk("iris:custom/blocks");
|
||||
|
||||
private Custom() {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.builtin.anchor;
|
||||
|
||||
import com.volmit.stage.PlacementStage;
|
||||
import com.volmit.stage.Stage;
|
||||
|
||||
/** Module {@code iris:anchor}: the height an object is placed at. */
|
||||
public final class AnchorStages {
|
||||
/** The requested or sampled height the checks judge. Rejects {@code carving-anchor}. */
|
||||
public static final PlacementStage<AnchorHeight> HEIGHT = Stage.placement("iris:anchor/height", AnchorHeight.class);
|
||||
/** The height the object's blocks are written at: the checked height plus the random offset. */
|
||||
public static final PlacementStage<AnchorHeight> FINAL = Stage.placement("iris:anchor/final", AnchorHeight.class);
|
||||
|
||||
private AnchorStages() {
|
||||
}
|
||||
}
|
||||
@@ -1,31 +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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.builtin.biome;
|
||||
|
||||
import com.volmit.stage.ChunkStage;
|
||||
import com.volmit.stage.Stage;
|
||||
|
||||
/** Module {@code iris:biome}: the biomes a chunk reports to the server. */
|
||||
public final class BiomeStages {
|
||||
/** Writes every column's biome, sky biome or custom biome, into the chunk. */
|
||||
public static final ChunkStage<Void> WRITE = Stage.chunk("iris:biome/write");
|
||||
|
||||
private BiomeStages() {
|
||||
}
|
||||
}
|
||||
@@ -1,36 +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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.builtin.blocks;
|
||||
|
||||
import com.volmit.stage.BlockStage;
|
||||
import com.volmit.stage.PlacementStage;
|
||||
import com.volmit.stage.Stage;
|
||||
|
||||
/** Module {@code iris:blocks}: writing the object's blocks. */
|
||||
public final class BlocksStages {
|
||||
/** Writes each object block where the placement puts it. */
|
||||
public static final BlockStage<WrittenBlocks> WRITE = Stage.placementBlock("iris:blocks/write", WrittenBlocks.class);
|
||||
/** Marks some written blocks with the placement's markers. */
|
||||
public static final PlacementStage<Void> MARKERS = Stage.placement("iris:blocks/markers");
|
||||
/** Milestone: stages requiring it run after the object and its markers are written. */
|
||||
public static final PlacementStage<Void> COMPLETE = Stage.placement("iris:blocks/complete");
|
||||
|
||||
private BlocksStages() {
|
||||
}
|
||||
}
|
||||
@@ -1,30 +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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.builtin.bore;
|
||||
|
||||
import com.volmit.stage.PlacementStage;
|
||||
import com.volmit.stage.Stage;
|
||||
|
||||
/** Module {@code iris:bore}: clearing the object's volume before its blocks are written. */
|
||||
public final class BoreStages {
|
||||
public static final PlacementStage<Void> CLEAR = Stage.placement("iris:bore/clear");
|
||||
|
||||
private BoreStages() {
|
||||
}
|
||||
}
|
||||
@@ -1,34 +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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.builtin.carve;
|
||||
|
||||
import com.volmit.stage.ChunkStage;
|
||||
import com.volmit.stage.MantleStage;
|
||||
import com.volmit.stage.Stage;
|
||||
|
||||
/** Module {@code iris:carve}: caves, planned in the mantle and cut into each chunk's terrain. */
|
||||
public final class CarveStages {
|
||||
/** Plans the caves of the dimension's cave profiles into the mantle, one block into each neighbor. */
|
||||
public static final MantleStage<Void> CAVES = Stage.mantle("iris:carve/caves");
|
||||
/** Cuts the planned caves out of the chunk's terrain and decorates their floors and ceilings. */
|
||||
public static final ChunkStage<Void> APPLY = Stage.chunk("iris:carve/apply");
|
||||
|
||||
private CarveStages() {
|
||||
}
|
||||
}
|
||||
@@ -1,31 +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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.builtin.custom;
|
||||
|
||||
import com.volmit.stage.ChunkStage;
|
||||
import com.volmit.stage.Stage;
|
||||
|
||||
/** Module {@code iris:custom}: blocks of content plugins, which the server places after generation. */
|
||||
public final class CustomStages {
|
||||
/** Records the chunk's custom blocks so the server can place them once the chunk exists. */
|
||||
public static final ChunkStage<Void> BLOCKS = Stage.chunk("iris:custom/blocks");
|
||||
|
||||
private CustomStages() {
|
||||
}
|
||||
}
|
||||
@@ -1,31 +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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.builtin.decorant;
|
||||
|
||||
import com.volmit.stage.ChunkStage;
|
||||
import com.volmit.stage.Stage;
|
||||
|
||||
/** Module {@code iris:decorant}: the decorators of biomes, such as grass, flowers and cave ceilings. */
|
||||
public final class DecorantStages {
|
||||
/** Places every column's surface, sea, shore and cave decorators. */
|
||||
public static final ChunkStage<Void> DECORATE = Stage.chunk("iris:decorant/decorate");
|
||||
|
||||
private DecorantStages() {
|
||||
}
|
||||
}
|
||||
@@ -1,34 +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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.builtin.deposit;
|
||||
|
||||
import com.volmit.stage.ChunkStage;
|
||||
import com.volmit.stage.Stage;
|
||||
|
||||
/** Module {@code iris:deposit}: ores and other deposits. */
|
||||
public final class DepositStages {
|
||||
/**
|
||||
* Places the deposits every level declares at the chunk's centre column, the dimension's, the region's and
|
||||
* the biome's, each with its own clumps. Active where any column of the chunk has deposits.
|
||||
*/
|
||||
public static final ChunkStage<Void> ORES = Stage.chunk("iris:deposit/ores");
|
||||
|
||||
private DepositStages() {
|
||||
}
|
||||
}
|
||||
@@ -1,36 +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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.builtin.floating;
|
||||
|
||||
import com.volmit.stage.ChunkStage;
|
||||
import com.volmit.stage.MantleStage;
|
||||
import com.volmit.stage.Stage;
|
||||
|
||||
/** Module {@code iris:floating}: the floating islands of floating child biomes. */
|
||||
public final class FloatingStages {
|
||||
/** Places the objects on and under the islands into the mantle, after the dimension's other objects. */
|
||||
public static final MantleStage<Void> OBJECTS = Stage.mantle("iris:floating/objects");
|
||||
/** Writes the islands' solid blocks. */
|
||||
public static final ChunkStage<Void> SOLIDS = Stage.chunk("iris:floating/solids");
|
||||
/** Decorates the islands' tops and bottoms once the chunk's own decoration is done. */
|
||||
public static final ChunkStage<Void> DECORATE = Stage.chunk("iris:floating/decorate");
|
||||
|
||||
private FloatingStages() {
|
||||
}
|
||||
}
|
||||
@@ -1,31 +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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.builtin.matter;
|
||||
|
||||
import com.volmit.stage.ChunkStage;
|
||||
import com.volmit.stage.Stage;
|
||||
|
||||
/** Module {@code iris:matter}: the blocks the mantle planned for a chunk, such as objects and structures. */
|
||||
public final class MatterStages {
|
||||
/** Copies the chunk's planned mantle blocks into it. */
|
||||
public static final ChunkStage<Void> INSERT = Stage.chunk("iris:matter/insert");
|
||||
|
||||
private MatterStages() {
|
||||
}
|
||||
}
|
||||
@@ -1,31 +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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.builtin.objects;
|
||||
|
||||
import com.volmit.stage.MantleStage;
|
||||
import com.volmit.stage.Stage;
|
||||
|
||||
/** Module {@code iris:objects}: the objects the dimension's regions and biomes place. */
|
||||
public final class ObjectStages {
|
||||
/** Places surface, cave and upper-dimension objects into the mantle, after the caves they anchor in. */
|
||||
public static final MantleStage<Void> PLACE = Stage.mantle("iris:objects/place");
|
||||
|
||||
private ObjectStages() {
|
||||
}
|
||||
}
|
||||
@@ -17,15 +17,15 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* The public face of Iris's built-in modules: their stage constants and the settings and output types
|
||||
* of those stages. {@link art.arcane.iris.core.modules.IrisModuleHost} exposes this package, with its
|
||||
* The public face of Iris's built-in modules: every stage constant, in {@link art.arcane.iris.builtin.IrisStages},
|
||||
* and the settings and output types of those stages. {@link art.arcane.iris.core.modules.IrisModuleHost} exposes this package, with its
|
||||
* subpackages, to pack modules, so a pack jar can {@code requires(...)} a built-in stage and read its
|
||||
* output. Everything here is part of what packs compile against.
|
||||
* <p>
|
||||
* Keep implementation out of it: stage bodies and anything that uses Iris internals live in the
|
||||
* built-in module classes outside this package, which packs cannot see. One subpackage per built-in
|
||||
* module, named after the module path, such as {@code art.arcane.iris.builtin.deposit} for
|
||||
* {@code iris:deposit}.
|
||||
* built-in module classes outside this package, which packs cannot see. Settings and output types go in one
|
||||
* subpackage per built-in module, named after the module path, such as {@code art.arcane.iris.builtin.deposit}
|
||||
* for {@code iris:deposit}.
|
||||
* <p>
|
||||
* Some built-in stages produce Iris's own types, such as the placement settings of {@code iris:prepare}. A
|
||||
* pack module can require such a stage to run after it, but cannot read its output: the pack load rejects
|
||||
|
||||
@@ -1,31 +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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.builtin.perfection;
|
||||
|
||||
import com.volmit.stage.ChunkStage;
|
||||
import com.volmit.stage.Stage;
|
||||
|
||||
/** Module {@code iris:perfection}: the last touches on an overworld chunk's blocks. */
|
||||
public final class PerfectionStages {
|
||||
/** Hides ores when the dimension asks, then removes decorations that nothing holds up. */
|
||||
public static final ChunkStage<Void> SURFACE = Stage.chunk("iris:perfection/surface");
|
||||
|
||||
private PerfectionStages() {
|
||||
}
|
||||
}
|
||||
@@ -1,31 +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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.builtin.post;
|
||||
|
||||
import com.volmit.stage.ChunkStage;
|
||||
import com.volmit.stage.Stage;
|
||||
|
||||
/** Module {@code iris:post}: smoothing a chunk's surface after carving. */
|
||||
public final class PostStages {
|
||||
/** Fills single-block holes, places slabs and walls on steps and settles snow. */
|
||||
public static final ChunkStage<Void> SMOOTH = Stage.chunk("iris:post/smooth");
|
||||
|
||||
private PostStages() {
|
||||
}
|
||||
}
|
||||
@@ -1,35 +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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.builtin.prepare;
|
||||
|
||||
import art.arcane.iris.engine.object.placement.IrisObjectPlacement;
|
||||
import art.arcane.iris.engine.object.placement.PreparedPlacement;
|
||||
import com.volmit.stage.PlacementStage;
|
||||
import com.volmit.stage.Stage;
|
||||
|
||||
/** Module {@code iris:prepare}: what a placement decides before it looks for its height. */
|
||||
public final class PrepareStages {
|
||||
/** The settings the placement uses: the requested ones, turned downhill when they ask to face the slope. Rejects {@code slope}. */
|
||||
public static final PlacementStage<IrisObjectPlacement> SLOPE = Stage.placement("iris:prepare/slope", IrisObjectPlacement.class);
|
||||
/** The random rotation, translation and height offset, chosen once per placement. */
|
||||
public static final PlacementStage<PreparedPlacement> TRANSFORMS = Stage.placement("iris:prepare/transforms", PreparedPlacement.class);
|
||||
|
||||
private PrepareStages() {
|
||||
}
|
||||
}
|
||||
@@ -1,30 +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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.builtin.snow;
|
||||
|
||||
import com.volmit.stage.PlacementStage;
|
||||
import com.volmit.stage.Stage;
|
||||
|
||||
/** Module {@code iris:snow}: snow on the object, after its stilt or terrain bend. */
|
||||
public final class SnowStages {
|
||||
public static final PlacementStage<Void> COVER = Stage.placement("iris:snow/cover");
|
||||
|
||||
private SnowStages() {
|
||||
}
|
||||
}
|
||||
@@ -1,34 +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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.builtin.stilt;
|
||||
|
||||
import com.volmit.stage.BlockStage;
|
||||
import com.volmit.stage.PlacementStage;
|
||||
import com.volmit.stage.Stage;
|
||||
|
||||
/** Module {@code iris:stilt}: the stilts of the stilt and ceiling placement modes. */
|
||||
public final class StiltStages {
|
||||
/** Finds the layers to repeat. */
|
||||
public static final BlockStage<StiltLayers> LAYERS = Stage.placementBlock("iris:stilt/layers", StiltLayers.class);
|
||||
/** Grows the stilt once the object is written. */
|
||||
public static final PlacementStage<Void> FILL = Stage.placement("iris:stilt/fill");
|
||||
|
||||
private StiltStages() {
|
||||
}
|
||||
}
|
||||
@@ -1,31 +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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.builtin.structure;
|
||||
|
||||
import com.volmit.stage.MantleStage;
|
||||
import com.volmit.stage.Stage;
|
||||
|
||||
/** Module {@code iris:structure}: Iris structures, assembled from pieces. */
|
||||
public final class StructureStages {
|
||||
/** Places the structures of the dimension, its regions and biomes into the mantle, after objects and floating objects. */
|
||||
public static final MantleStage<Void> PLACE = Stage.mantle("iris:structure/place");
|
||||
|
||||
private StructureStages() {
|
||||
}
|
||||
}
|
||||
@@ -1,31 +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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.builtin.terrain;
|
||||
|
||||
import com.volmit.stage.ChunkStage;
|
||||
import com.volmit.stage.Stage;
|
||||
|
||||
/** Module {@code iris:terrain}: the solid ground, fluids and biome layers of a chunk. */
|
||||
public final class TerrainStages {
|
||||
/** Fills each column from bedrock up to its height and the fluid height, with its biome's layers. */
|
||||
public static final ChunkStage<Void> SHAPE = Stage.chunk("iris:terrain/shape");
|
||||
|
||||
private TerrainStages() {
|
||||
}
|
||||
}
|
||||
@@ -1,30 +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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.builtin.vacuum;
|
||||
|
||||
import com.volmit.stage.PlacementStage;
|
||||
import com.volmit.stage.Stage;
|
||||
|
||||
/** Module {@code iris:vacuum}: bending the terrain to meet objects of the vacuum placement modes. */
|
||||
public final class VacuumStages {
|
||||
public static final PlacementStage<Void> TERRAIN = Stage.placement("iris:vacuum/terrain");
|
||||
|
||||
private VacuumStages() {
|
||||
}
|
||||
}
|
||||
@@ -1,37 +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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.builtin.validate;
|
||||
|
||||
import com.volmit.stage.PlacementStage;
|
||||
import com.volmit.stage.Stage;
|
||||
|
||||
/** Module {@code iris:validate}: the checks that reject a placement before anything is written, in this order. */
|
||||
public final class ValidateStages {
|
||||
/** Rejects {@code bedrock-anchor} and {@code surface-support}. */
|
||||
public static final PlacementStage<Void> SURFACE = Stage.placement("iris:validate/surface");
|
||||
/** Rejects {@code underwater-anchor}, {@code cave-clearance}, {@code fluid-height} and {@code height-clamp}. */
|
||||
public static final PlacementStage<Void> LIMITS = Stage.placement("iris:validate/limits");
|
||||
/** Rejects {@code native-structure}, even for placements that force their way past the other checks. */
|
||||
public static final PlacementStage<Void> STRUCTURES = Stage.placement("iris:validate/structures");
|
||||
/** Rejects {@code object-collision}. */
|
||||
public static final PlacementStage<Void> COLLISIONS = Stage.placement("iris:validate/collisions");
|
||||
|
||||
private ValidateStages() {
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
package art.arcane.iris.engine.actuator;
|
||||
|
||||
import art.arcane.iris.builtin.biome.BiomeStages;
|
||||
import art.arcane.iris.builtin.IrisStages;
|
||||
import art.arcane.iris.core.modules.IrisChunk;
|
||||
import art.arcane.iris.engine.framework.Engine;
|
||||
import art.arcane.iris.engine.object.world.biome.IrisBiome;
|
||||
@@ -55,7 +55,7 @@ public final class BiomeModule implements IrisModule {
|
||||
|
||||
@Override
|
||||
public void install(StageGraph graph) {
|
||||
graph.define(BiomeStages.WRITE).run(BiomeModule::write);
|
||||
graph.define(IrisStages.Biome.WRITE).run(BiomeModule::write);
|
||||
}
|
||||
|
||||
private static void write(ChunkStageContext context) {
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
|
||||
package art.arcane.iris.engine.actuator;
|
||||
|
||||
import art.arcane.iris.builtin.decorant.DecorantStages;
|
||||
import art.arcane.iris.builtin.matter.MatterStages;
|
||||
import art.arcane.iris.builtin.IrisStages;
|
||||
import art.arcane.iris.core.modules.IrisChunk;
|
||||
import art.arcane.iris.engine.decorator.IrisSeaFloorDecorator;
|
||||
import art.arcane.iris.engine.decorator.IrisSeaSurfaceDecorator;
|
||||
@@ -56,7 +55,7 @@ public final class DecorantModule implements IrisModule {
|
||||
|
||||
@Override
|
||||
public void install(StageGraph graph) {
|
||||
graph.define(DecorantStages.DECORATE).requires(MatterStages.INSERT).run(DecorantModule::decorate);
|
||||
graph.define(IrisStages.Decorant.DECORATE).requires(IrisStages.Matter.INSERT).run(DecorantModule::decorate);
|
||||
}
|
||||
|
||||
private static void decorate(ChunkStageContext context) {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
package art.arcane.iris.engine.actuator;
|
||||
|
||||
import art.arcane.iris.builtin.terrain.TerrainStages;
|
||||
import art.arcane.iris.builtin.IrisStages;
|
||||
import art.arcane.iris.core.loader.IrisData;
|
||||
import art.arcane.iris.core.modules.IrisChunk;
|
||||
import art.arcane.iris.engine.IrisComplex;
|
||||
@@ -58,7 +58,7 @@ public final class TerrainModule implements IrisModule {
|
||||
|
||||
@Override
|
||||
public void install(StageGraph graph) {
|
||||
graph.define(TerrainStages.SHAPE).run(TerrainModule::shape);
|
||||
graph.define(IrisStages.Terrain.SHAPE).run(TerrainModule::shape);
|
||||
}
|
||||
|
||||
private static void shape(ChunkStageContext context) {
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
|
||||
package art.arcane.iris.engine.mantle.components;
|
||||
|
||||
import art.arcane.iris.builtin.carve.CarveStages;
|
||||
import art.arcane.iris.builtin.objects.ObjectStages;
|
||||
import art.arcane.iris.builtin.IrisStages;
|
||||
import art.arcane.iris.core.modules.IrisMantleChunk;
|
||||
import art.arcane.iris.core.modules.IrisPackSettings;
|
||||
import art.arcane.iris.engine.framework.Engine;
|
||||
@@ -44,7 +43,7 @@ public final class ObjectModule implements IrisModule {
|
||||
|
||||
@Override
|
||||
public void install(StageGraph graph) {
|
||||
graph.define(ObjectStages.PLACE).requires(CarveStages.CAVES).reach(ObjectModule::reach).run(ObjectModule::place);
|
||||
graph.define(IrisStages.Objects.PLACE).requires(IrisStages.Carve.CAVES).reach(ObjectModule::reach).run(ObjectModule::place);
|
||||
}
|
||||
|
||||
private static void place(MantleStageContext context) {
|
||||
|
||||
@@ -18,9 +18,7 @@
|
||||
|
||||
package art.arcane.iris.engine.mantle.components;
|
||||
|
||||
import art.arcane.iris.builtin.floating.FloatingStages;
|
||||
import art.arcane.iris.builtin.objects.ObjectStages;
|
||||
import art.arcane.iris.builtin.structure.StructureStages;
|
||||
import art.arcane.iris.builtin.IrisStages;
|
||||
import art.arcane.iris.core.modules.IrisMantleChunk;
|
||||
import art.arcane.iris.core.modules.IrisPackSettings;
|
||||
import art.arcane.iris.engine.framework.Engine;
|
||||
@@ -45,7 +43,7 @@ public final class StructureModule implements IrisModule {
|
||||
|
||||
@Override
|
||||
public void install(StageGraph graph) {
|
||||
graph.define(StructureStages.PLACE).requires(ObjectStages.PLACE).softAfter(FloatingStages.OBJECTS.ref())
|
||||
graph.define(IrisStages.Structure.PLACE).requires(IrisStages.Objects.PLACE).softAfter(IrisStages.Floating.OBJECTS.ref())
|
||||
.reach(StructureModule::reach).run(StructureModule::place);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
|
||||
package art.arcane.iris.engine.modifier;
|
||||
|
||||
import art.arcane.iris.builtin.carve.CarveStages;
|
||||
import art.arcane.iris.builtin.terrain.TerrainStages;
|
||||
import art.arcane.iris.builtin.IrisStages;
|
||||
import art.arcane.iris.core.modules.IrisChunk;
|
||||
import art.arcane.iris.core.modules.IrisMantleChunk;
|
||||
import art.arcane.iris.engine.mantle.components.CaveCarving;
|
||||
@@ -49,8 +48,8 @@ public final class CarveModule implements IrisModule {
|
||||
|
||||
@Override
|
||||
public void install(StageGraph graph) {
|
||||
graph.define(CarveStages.CAVES).reach(CAVE_REACH_BLOCKS).run(CarveModule::planCaves);
|
||||
graph.define(CarveStages.APPLY).requires(TerrainStages.SHAPE).run(CarveModule::applyCaves);
|
||||
graph.define(IrisStages.Carve.CAVES).reach(CAVE_REACH_BLOCKS).run(CarveModule::planCaves);
|
||||
graph.define(IrisStages.Carve.APPLY).requires(IrisStages.Terrain.SHAPE).run(CarveModule::applyCaves);
|
||||
}
|
||||
|
||||
private static void planCaves(MantleStageContext context) {
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
|
||||
package art.arcane.iris.engine.modifier;
|
||||
|
||||
import art.arcane.iris.builtin.custom.CustomStages;
|
||||
import art.arcane.iris.builtin.perfection.PerfectionStages;
|
||||
import art.arcane.iris.builtin.IrisStages;
|
||||
import art.arcane.iris.core.link.Identifier;
|
||||
import art.arcane.iris.core.modules.IrisChunk;
|
||||
import art.arcane.iris.engine.framework.Engine;
|
||||
@@ -52,7 +51,7 @@ public final class CustomModule implements IrisModule {
|
||||
|
||||
@Override
|
||||
public void install(StageGraph graph) {
|
||||
graph.define(CustomStages.BLOCKS).requires(PerfectionStages.SURFACE).run(CustomModule::record);
|
||||
graph.define(IrisStages.Custom.BLOCKS).requires(IrisStages.Perfection.SURFACE).run(CustomModule::record);
|
||||
}
|
||||
|
||||
private static void record(ChunkStageContext context) {
|
||||
|
||||
@@ -18,10 +18,8 @@
|
||||
|
||||
package art.arcane.iris.engine.modifier;
|
||||
|
||||
import art.arcane.iris.builtin.IrisStages;
|
||||
import art.arcane.iris.builtin.deposit.DepositSettings;
|
||||
import art.arcane.iris.builtin.deposit.DepositStages;
|
||||
import art.arcane.iris.builtin.floating.FloatingStages;
|
||||
import art.arcane.iris.builtin.terrain.TerrainStages;
|
||||
import art.arcane.iris.core.modules.IrisChunk;
|
||||
import art.arcane.iris.engine.object.terrain.deposit.IrisDepositGenerator;
|
||||
import com.volmit.IrisModule;
|
||||
@@ -52,10 +50,10 @@ public final class DepositModule implements IrisModule {
|
||||
|
||||
@Override
|
||||
public void install(StageGraph graph) {
|
||||
graph.define(DepositStages.ORES)
|
||||
graph.define(IrisStages.Deposit.ORES)
|
||||
.when(DepositSettings.class)
|
||||
.requires(TerrainStages.SHAPE)
|
||||
.softAfter(FloatingStages.SOLIDS.ref())
|
||||
.requires(IrisStages.Terrain.SHAPE)
|
||||
.softAfter(IrisStages.Floating.SOLIDS.ref())
|
||||
.run(DepositModule::place);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,10 +18,7 @@
|
||||
|
||||
package art.arcane.iris.engine.modifier;
|
||||
|
||||
import art.arcane.iris.builtin.decorant.DecorantStages;
|
||||
import art.arcane.iris.builtin.floating.FloatingStages;
|
||||
import art.arcane.iris.builtin.objects.ObjectStages;
|
||||
import art.arcane.iris.builtin.post.PostStages;
|
||||
import art.arcane.iris.builtin.IrisStages;
|
||||
import art.arcane.iris.core.modules.IrisChunk;
|
||||
import art.arcane.iris.core.modules.IrisMantleChunk;
|
||||
import art.arcane.iris.core.modules.IrisPackSettings;
|
||||
@@ -51,10 +48,10 @@ public final class FloatingModule implements IrisModule {
|
||||
|
||||
@Override
|
||||
public void install(StageGraph graph) {
|
||||
graph.define(FloatingStages.OBJECTS).softAfter(ObjectStages.PLACE.ref()).reach(FloatingModule::objectReach)
|
||||
graph.define(IrisStages.Floating.OBJECTS).softAfter(IrisStages.Objects.PLACE.ref()).reach(FloatingModule::objectReach)
|
||||
.run(FloatingModule::objects);
|
||||
graph.define(FloatingStages.SOLIDS).requires(PostStages.SMOOTH).run(FloatingModule::solids);
|
||||
graph.define(FloatingStages.DECORATE).requires(DecorantStages.DECORATE).run(FloatingModule::decorate);
|
||||
graph.define(IrisStages.Floating.SOLIDS).requires(IrisStages.Post.SMOOTH).run(FloatingModule::solids);
|
||||
graph.define(IrisStages.Floating.DECORATE).requires(IrisStages.Decorant.DECORATE).run(FloatingModule::decorate);
|
||||
}
|
||||
|
||||
private static void objects(MantleStageContext context) {
|
||||
|
||||
@@ -18,9 +18,7 @@
|
||||
|
||||
package art.arcane.iris.engine.modifier;
|
||||
|
||||
import art.arcane.iris.builtin.deposit.DepositStages;
|
||||
import art.arcane.iris.builtin.floating.FloatingStages;
|
||||
import art.arcane.iris.builtin.matter.MatterStages;
|
||||
import art.arcane.iris.builtin.IrisStages;
|
||||
import art.arcane.iris.core.modules.IrisChunk;
|
||||
import art.arcane.iris.engine.UpperDimensionContext;
|
||||
import art.arcane.iris.engine.framework.Engine;
|
||||
@@ -52,9 +50,9 @@ public final class MatterModule implements IrisModule {
|
||||
|
||||
@Override
|
||||
public void install(StageGraph graph) {
|
||||
graph.define(MatterStages.INSERT)
|
||||
.requires(FloatingStages.SOLIDS)
|
||||
.softAfter(DepositStages.ORES.ref())
|
||||
graph.define(IrisStages.Matter.INSERT)
|
||||
.requires(IrisStages.Floating.SOLIDS)
|
||||
.softAfter(IrisStages.Deposit.ORES.ref())
|
||||
.run(MatterModule::insert);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
|
||||
package art.arcane.iris.engine.modifier;
|
||||
|
||||
import art.arcane.iris.builtin.floating.FloatingStages;
|
||||
import art.arcane.iris.builtin.perfection.PerfectionStages;
|
||||
import art.arcane.iris.builtin.IrisStages;
|
||||
import art.arcane.iris.core.modules.IrisChunk;
|
||||
import art.arcane.iris.engine.framework.Engine;
|
||||
import art.arcane.iris.engine.object.procedural.IrisProceduralBlocks;
|
||||
@@ -60,7 +59,7 @@ public final class PerfectionModule implements IrisModule {
|
||||
|
||||
@Override
|
||||
public void install(StageGraph graph) {
|
||||
graph.define(PerfectionStages.SURFACE).requires(FloatingStages.DECORATE).run(PerfectionModule::perfect);
|
||||
graph.define(IrisStages.Perfection.SURFACE).requires(IrisStages.Floating.DECORATE).run(PerfectionModule::perfect);
|
||||
}
|
||||
|
||||
private static void perfect(ChunkStageContext context) {
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
|
||||
package art.arcane.iris.engine.modifier;
|
||||
|
||||
import art.arcane.iris.builtin.carve.CarveStages;
|
||||
import art.arcane.iris.builtin.post.PostStages;
|
||||
import art.arcane.iris.builtin.IrisStages;
|
||||
import art.arcane.iris.core.modules.IrisChunk;
|
||||
import com.volmit.IrisModule;
|
||||
import com.volmit.ModuleInfo;
|
||||
@@ -40,7 +39,7 @@ public final class PostModule implements IrisModule {
|
||||
|
||||
@Override
|
||||
public void install(StageGraph graph) {
|
||||
graph.define(PostStages.SMOOTH).requires(CarveStages.APPLY).run(PostModule::smooth);
|
||||
graph.define(IrisStages.Post.SMOOTH).requires(IrisStages.Carve.APPLY).run(PostModule::smooth);
|
||||
}
|
||||
|
||||
private static void smooth(ChunkStageContext context) {
|
||||
|
||||
@@ -18,10 +18,8 @@
|
||||
|
||||
package art.arcane.iris.engine.object.placement;
|
||||
|
||||
import art.arcane.iris.builtin.IrisStages;
|
||||
import art.arcane.iris.builtin.anchor.AnchorHeight;
|
||||
import art.arcane.iris.builtin.anchor.AnchorStages;
|
||||
import art.arcane.iris.builtin.prepare.PrepareStages;
|
||||
import art.arcane.iris.builtin.validate.ValidateStages;
|
||||
import art.arcane.iris.core.modules.IrisPlacement;
|
||||
import art.arcane.iris.engine.object.prefab.IrisObject;
|
||||
import art.arcane.iris.engine.object.terrain.carving.CarvingMode;
|
||||
@@ -46,17 +44,17 @@ public final class AnchorModule implements IrisModule {
|
||||
|
||||
@Override
|
||||
public void install(StageGraph graph) {
|
||||
graph.define(AnchorStages.HEIGHT)
|
||||
.requires(PrepareStages.TRANSFORMS)
|
||||
graph.define(IrisStages.Anchor.HEIGHT)
|
||||
.requires(IrisStages.Prepare.TRANSFORMS)
|
||||
.produce(AnchorModule::height);
|
||||
graph.define(AnchorStages.FINAL)
|
||||
.requires(AnchorStages.HEIGHT, ValidateStages.COLLISIONS)
|
||||
graph.define(IrisStages.Anchor.FINAL)
|
||||
.requires(IrisStages.Anchor.HEIGHT, IrisStages.Validate.COLLISIONS)
|
||||
.produce(AnchorModule::finalHeight);
|
||||
}
|
||||
|
||||
private static AnchorHeight height(PlacementStageContext context) {
|
||||
IrisPlacement placement = IrisPlacement.current();
|
||||
PreparedPlacement prepared = context.output(PrepareStages.TRANSFORMS);
|
||||
PreparedPlacement prepared = context.output(IrisStages.Prepare.TRANSFORMS);
|
||||
IrisObjectPlacement config = prepared.config();
|
||||
boolean structurePiece = prepared.mode() == ObjectPlaceMode.STRUCTURE_PIECE;
|
||||
if (!config.isFromBottom() && placement.requestedY() < 0) {
|
||||
@@ -80,7 +78,7 @@ public final class AnchorModule implements IrisModule {
|
||||
}
|
||||
|
||||
private static AnchorHeight finalHeight(PlacementStageContext context) {
|
||||
int y = context.output(AnchorStages.HEIGHT).y() + context.output(PrepareStages.TRANSFORMS).randomY();
|
||||
int y = context.output(IrisStages.Anchor.HEIGHT).y() + context.output(IrisStages.Prepare.TRANSFORMS).randomY();
|
||||
IrisPlacement.current().anchoredAt(y);
|
||||
return new AnchorHeight(y);
|
||||
}
|
||||
|
||||
@@ -18,12 +18,9 @@
|
||||
|
||||
package art.arcane.iris.engine.object.placement;
|
||||
|
||||
import art.arcane.iris.builtin.anchor.AnchorStages;
|
||||
import art.arcane.iris.builtin.blocks.BlocksStages;
|
||||
import art.arcane.iris.builtin.IrisStages;
|
||||
import art.arcane.iris.builtin.blocks.ObjectMarkers;
|
||||
import art.arcane.iris.builtin.blocks.WrittenBlocks;
|
||||
import art.arcane.iris.builtin.bore.BoreStages;
|
||||
import art.arcane.iris.builtin.prepare.PrepareStages;
|
||||
import art.arcane.iris.core.modules.BlockEntities;
|
||||
import art.arcane.iris.core.modules.IrisPlacement;
|
||||
import art.arcane.iris.engine.object.marker.IrisMarker;
|
||||
@@ -70,26 +67,26 @@ public final class BlocksModule implements IrisModule {
|
||||
|
||||
@Override
|
||||
public void install(StageGraph graph) {
|
||||
graph.define(BlocksStages.WRITE)
|
||||
.requires(PrepareStages.TRANSFORMS, AnchorStages.FINAL, BoreStages.CLEAR)
|
||||
graph.define(IrisStages.Blocks.WRITE)
|
||||
.requires(IrisStages.Prepare.TRANSFORMS, IrisStages.Anchor.FINAL, IrisStages.Bore.CLEAR)
|
||||
.accumulate(WrittenBlocks::new, BlocksModule::write);
|
||||
graph.define(BlocksStages.MARKERS)
|
||||
.requires(BlocksStages.WRITE, PrepareStages.TRANSFORMS)
|
||||
graph.define(IrisStages.Blocks.MARKERS)
|
||||
.requires(IrisStages.Blocks.WRITE, IrisStages.Prepare.TRANSFORMS)
|
||||
.run(BlocksModule::placeMarkers);
|
||||
graph.define(BlocksStages.COMPLETE)
|
||||
.requires(BlocksStages.WRITE, BlocksStages.MARKERS)
|
||||
graph.define(IrisStages.Blocks.COMPLETE)
|
||||
.requires(IrisStages.Blocks.WRITE, IrisStages.Blocks.MARKERS)
|
||||
.run(context -> {
|
||||
});
|
||||
}
|
||||
|
||||
private static void write(BlockStageContext context, WrittenBlocks written) {
|
||||
IrisPlacement placement = IrisPlacement.current();
|
||||
PreparedPlacement prepared = context.output(PrepareStages.TRANSFORMS);
|
||||
PreparedPlacement prepared = context.output(IrisStages.Prepare.TRANSFORMS);
|
||||
IrisObjectPlacement config = prepared.config();
|
||||
PlacementWorld world = new PlacementWorld(context.access(), placement.states());
|
||||
ObjectBlock block = context.block();
|
||||
BlockPosition offset = prepared.transform(block.position());
|
||||
int anchorY = context.output(AnchorStages.FINAL).y();
|
||||
int anchorY = context.output(IrisStages.Anchor.FINAL).y();
|
||||
PlatformBlockState data = sourceState(block, placement, prepared);
|
||||
TileData tile = block.blockEntity().map(BlockEntities::tileOf).orElse(null);
|
||||
if (!config.getEdit().isEmpty()) {
|
||||
@@ -189,12 +186,12 @@ public final class BlocksModule implements IrisModule {
|
||||
*/
|
||||
private static void placeMarkers(PlacementStageContext context) {
|
||||
IrisPlacement placement = IrisPlacement.current();
|
||||
PreparedPlacement prepared = context.output(PrepareStages.TRANSFORMS);
|
||||
PreparedPlacement prepared = context.output(IrisStages.Prepare.TRANSFORMS);
|
||||
IrisObjectPlacement config = prepared.config();
|
||||
if (config.getMarkers().isEmpty() || prepared.terrain().getEngine() == null) {
|
||||
return;
|
||||
}
|
||||
WrittenBlocks written = context.output(BlocksStages.WRITE);
|
||||
WrittenBlocks written = context.output(IrisStages.Blocks.WRITE);
|
||||
PlacementWorld world = new PlacementWorld(context.access(), placement.states());
|
||||
RNG markerRandom = new RNG(context.random().nextLong());
|
||||
int salt = 0;
|
||||
|
||||
@@ -18,10 +18,7 @@
|
||||
|
||||
package art.arcane.iris.engine.object.placement;
|
||||
|
||||
import art.arcane.iris.builtin.anchor.AnchorStages;
|
||||
import art.arcane.iris.builtin.bore.BoreStages;
|
||||
import art.arcane.iris.builtin.prepare.PrepareStages;
|
||||
import art.arcane.iris.builtin.validate.ValidateStages;
|
||||
import art.arcane.iris.builtin.IrisStages;
|
||||
import art.arcane.iris.core.modules.IrisPlacement;
|
||||
import art.arcane.iris.engine.object.prefab.IrisObject;
|
||||
import com.volmit.IrisModule;
|
||||
@@ -38,19 +35,19 @@ public final class BoreModule implements IrisModule {
|
||||
|
||||
@Override
|
||||
public void install(StageGraph graph) {
|
||||
graph.define(BoreStages.CLEAR)
|
||||
.requires(AnchorStages.FINAL, ValidateStages.COLLISIONS)
|
||||
graph.define(IrisStages.Bore.CLEAR)
|
||||
.requires(IrisStages.Anchor.FINAL, IrisStages.Validate.COLLISIONS)
|
||||
.run(BoreModule::clear);
|
||||
}
|
||||
|
||||
private static void clear(PlacementStageContext context) {
|
||||
PreparedPlacement prepared = context.output(PrepareStages.TRANSFORMS);
|
||||
PreparedPlacement prepared = context.output(IrisStages.Prepare.TRANSFORMS);
|
||||
IrisObjectPlacement config = prepared.config();
|
||||
if (!config.isBore()) {
|
||||
return;
|
||||
}
|
||||
IrisPlacement placement = IrisPlacement.current();
|
||||
WorldVolume volume = WorldVolume.of(placement, prepared, context.output(AnchorStages.FINAL).y());
|
||||
WorldVolume volume = WorldVolume.of(placement, prepared, context.output(IrisStages.Anchor.FINAL).y());
|
||||
PlacementWorld world = new PlacementWorld(context.access(), placement.states());
|
||||
for (int x = volume.minX(); x <= volume.maxX(); x++) {
|
||||
for (int y = volume.minY() - config.getBoreExtendMinY(); y <= volume.maxY() + config.getBoreExtendMaxY(); y++) {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
package art.arcane.iris.engine.object.placement;
|
||||
|
||||
import art.arcane.iris.builtin.prepare.PrepareStages;
|
||||
import art.arcane.iris.builtin.IrisStages;
|
||||
import art.arcane.iris.core.modules.IrisPlacement;
|
||||
import art.arcane.iris.engine.framework.Engine;
|
||||
import art.arcane.iris.engine.framework.placer.HeightmapObjectPlacer;
|
||||
@@ -54,9 +54,9 @@ public final class PrepareModule implements IrisModule {
|
||||
|
||||
@Override
|
||||
public void install(StageGraph graph) {
|
||||
graph.define(PrepareStages.SLOPE).produce(PrepareModule::slope);
|
||||
graph.define(PrepareStages.TRANSFORMS)
|
||||
.requires(PrepareStages.SLOPE)
|
||||
graph.define(IrisStages.Prepare.SLOPE).produce(PrepareModule::slope);
|
||||
graph.define(IrisStages.Prepare.TRANSFORMS)
|
||||
.requires(IrisStages.Prepare.SLOPE)
|
||||
.produce(PrepareModule::transforms);
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ public final class PrepareModule implements IrisModule {
|
||||
|
||||
private static PreparedPlacement transforms(PlacementStageContext context) {
|
||||
IrisPlacement placement = IrisPlacement.current();
|
||||
IrisObjectPlacement config = context.output(PrepareStages.SLOPE);
|
||||
IrisObjectPlacement config = context.output(IrisStages.Prepare.SLOPE);
|
||||
IrisObject object = placement.object();
|
||||
RNG rng = new RNG(context.random().nextLong());
|
||||
IObjectPlacer terrain = config.getHeightmap() == null ? placement.placer()
|
||||
|
||||
@@ -18,12 +18,8 @@
|
||||
|
||||
package art.arcane.iris.engine.object.placement;
|
||||
|
||||
import art.arcane.iris.builtin.blocks.BlocksStages;
|
||||
import art.arcane.iris.builtin.IrisStages;
|
||||
import art.arcane.iris.builtin.blocks.WrittenBlocks;
|
||||
import art.arcane.iris.builtin.prepare.PrepareStages;
|
||||
import art.arcane.iris.builtin.snow.SnowStages;
|
||||
import art.arcane.iris.builtin.stilt.StiltStages;
|
||||
import art.arcane.iris.builtin.vacuum.VacuumStages;
|
||||
import art.arcane.iris.core.modules.IrisPlacement;
|
||||
import art.arcane.iris.engine.object.prefab.IrisObject;
|
||||
import art.arcane.volmlib.util.math.RNG;
|
||||
@@ -51,15 +47,15 @@ public final class SnowModule implements IrisModule {
|
||||
|
||||
@Override
|
||||
public void install(StageGraph graph) {
|
||||
graph.define(SnowStages.COVER)
|
||||
.requires(BlocksStages.WRITE, BlocksStages.COMPLETE, PrepareStages.TRANSFORMS)
|
||||
.softAfter(StiltStages.FILL.ref(), VacuumStages.TERRAIN.ref())
|
||||
graph.define(IrisStages.Snow.COVER)
|
||||
.requires(IrisStages.Blocks.WRITE, IrisStages.Blocks.COMPLETE, IrisStages.Prepare.TRANSFORMS)
|
||||
.softAfter(IrisStages.Stilt.FILL.ref(), IrisStages.Vacuum.TERRAIN.ref())
|
||||
.run(SnowModule::cover);
|
||||
}
|
||||
|
||||
private static void cover(PlacementStageContext context) {
|
||||
double snow = context.output(PrepareStages.TRANSFORMS).config().getSnow();
|
||||
WrittenBlocks written = context.output(BlocksStages.WRITE);
|
||||
double snow = context.output(IrisStages.Prepare.TRANSFORMS).config().getSnow();
|
||||
WrittenBlocks written = context.output(IrisStages.Blocks.WRITE);
|
||||
if (!(snow > 0) || written.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -18,12 +18,8 @@
|
||||
|
||||
package art.arcane.iris.engine.object.placement;
|
||||
|
||||
import art.arcane.iris.builtin.anchor.AnchorStages;
|
||||
import art.arcane.iris.builtin.blocks.BlocksStages;
|
||||
import art.arcane.iris.builtin.bore.BoreStages;
|
||||
import art.arcane.iris.builtin.prepare.PrepareStages;
|
||||
import art.arcane.iris.builtin.IrisStages;
|
||||
import art.arcane.iris.builtin.stilt.StiltLayers;
|
||||
import art.arcane.iris.builtin.stilt.StiltStages;
|
||||
import art.arcane.iris.core.modules.IrisPlacement;
|
||||
import art.arcane.iris.engine.object.prefab.IrisObjectShaping;
|
||||
import art.arcane.iris.engine.object.procedural.IrisProceduralBlocks;
|
||||
@@ -70,18 +66,18 @@ public final class StiltModule implements IrisModule {
|
||||
|
||||
@Override
|
||||
public void install(StageGraph graph) {
|
||||
graph.define(StiltStages.LAYERS)
|
||||
.requires(PrepareStages.TRANSFORMS)
|
||||
graph.define(IrisStages.Stilt.LAYERS)
|
||||
.requires(IrisStages.Prepare.TRANSFORMS)
|
||||
// Ordered after boring only so it shares the block pass that writes the object.
|
||||
.softAfter(BoreStages.CLEAR.ref())
|
||||
.softAfter(IrisStages.Bore.CLEAR.ref())
|
||||
.accumulate(StiltLayers::new, StiltModule::collectLayer);
|
||||
graph.define(StiltStages.FILL)
|
||||
.requires(StiltStages.LAYERS, AnchorStages.FINAL, BlocksStages.COMPLETE)
|
||||
graph.define(IrisStages.Stilt.FILL)
|
||||
.requires(IrisStages.Stilt.LAYERS, IrisStages.Anchor.FINAL, IrisStages.Blocks.COMPLETE)
|
||||
.run(StiltModule::fill);
|
||||
}
|
||||
|
||||
private static void collectLayer(BlockStageContext context, StiltLayers layers) {
|
||||
PreparedPlacement prepared = context.output(PrepareStages.TRANSFORMS);
|
||||
PreparedPlacement prepared = context.output(IrisStages.Prepare.TRANSFORMS);
|
||||
if (prepared.mode().stilt() == StiltShape.NONE) {
|
||||
return;
|
||||
}
|
||||
@@ -93,9 +89,9 @@ public final class StiltModule implements IrisModule {
|
||||
}
|
||||
|
||||
private static void fill(PlacementStageContext context) {
|
||||
PreparedPlacement prepared = context.output(PrepareStages.TRANSFORMS);
|
||||
PreparedPlacement prepared = context.output(IrisStages.Prepare.TRANSFORMS);
|
||||
StiltShape shape = prepared.mode().stilt();
|
||||
StiltLayers layers = context.output(StiltStages.LAYERS);
|
||||
StiltLayers layers = context.output(IrisStages.Stilt.LAYERS);
|
||||
if (shape == StiltShape.NONE || layers.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
@@ -127,7 +123,7 @@ public final class StiltModule implements IrisModule {
|
||||
this.shape = prepared.mode().stilt();
|
||||
this.world = new PlacementWorld(context.access(), placement.states());
|
||||
this.rng = new RNG(context.random().nextLong());
|
||||
this.anchorY = context.output(AnchorStages.FINAL).y();
|
||||
this.anchorY = context.output(IrisStages.Anchor.FINAL).y();
|
||||
this.layerY = shape == StiltShape.CEILING ? layers.topY() : layers.bottomY();
|
||||
this.erode = shape == StiltShape.ERODE ? ErodeShape.of(layers.bottom()) : null;
|
||||
}
|
||||
|
||||
@@ -18,10 +18,8 @@
|
||||
|
||||
package art.arcane.iris.engine.object.placement;
|
||||
|
||||
import art.arcane.iris.builtin.blocks.BlocksStages;
|
||||
import art.arcane.iris.builtin.IrisStages;
|
||||
import art.arcane.iris.builtin.blocks.WrittenBlocks;
|
||||
import art.arcane.iris.builtin.prepare.PrepareStages;
|
||||
import art.arcane.iris.builtin.vacuum.VacuumStages;
|
||||
import art.arcane.iris.core.modules.IrisPlacement;
|
||||
import art.arcane.iris.engine.IrisComplex;
|
||||
import art.arcane.iris.engine.framework.Engine;
|
||||
@@ -53,15 +51,15 @@ public final class VacuumModule implements IrisModule {
|
||||
|
||||
@Override
|
||||
public void install(StageGraph graph) {
|
||||
graph.define(VacuumStages.TERRAIN)
|
||||
.requires(BlocksStages.WRITE, BlocksStages.COMPLETE, PrepareStages.TRANSFORMS)
|
||||
graph.define(IrisStages.Vacuum.TERRAIN)
|
||||
.requires(IrisStages.Blocks.WRITE, IrisStages.Blocks.COMPLETE, IrisStages.Prepare.TRANSFORMS)
|
||||
.reach(IrisObjectVacuum.MAX_RADIUS_BLOCKS)
|
||||
.run(VacuumModule::bendTerrain);
|
||||
}
|
||||
|
||||
private static void bendTerrain(PlacementStageContext context) {
|
||||
PreparedPlacement prepared = context.output(PrepareStages.TRANSFORMS);
|
||||
WrittenBlocks written = context.output(BlocksStages.WRITE);
|
||||
PreparedPlacement prepared = context.output(IrisStages.Prepare.TRANSFORMS);
|
||||
WrittenBlocks written = context.output(IrisStages.Blocks.WRITE);
|
||||
Engine engine = prepared.terrain().getEngine();
|
||||
if (!prepared.mode().isVacuum() || written.isEmpty() || engine == null) {
|
||||
return;
|
||||
|
||||
@@ -18,9 +18,7 @@
|
||||
|
||||
package art.arcane.iris.engine.object.placement;
|
||||
|
||||
import art.arcane.iris.builtin.anchor.AnchorStages;
|
||||
import art.arcane.iris.builtin.prepare.PrepareStages;
|
||||
import art.arcane.iris.builtin.validate.ValidateStages;
|
||||
import art.arcane.iris.builtin.IrisStages;
|
||||
import art.arcane.iris.core.modules.IrisPlacement;
|
||||
import art.arcane.iris.engine.framework.Engine;
|
||||
import art.arcane.iris.engine.framework.NativeStructureVolume;
|
||||
@@ -57,29 +55,29 @@ public final class ValidateModule implements IrisModule {
|
||||
|
||||
@Override
|
||||
public void install(StageGraph graph) {
|
||||
graph.define(ValidateStages.SURFACE)
|
||||
.requires(AnchorStages.HEIGHT)
|
||||
graph.define(IrisStages.Validate.SURFACE)
|
||||
.requires(IrisStages.Anchor.HEIGHT)
|
||||
.run(ValidateModule::checkSurface);
|
||||
graph.define(ValidateStages.LIMITS)
|
||||
.requires(ValidateStages.SURFACE, AnchorStages.HEIGHT)
|
||||
graph.define(IrisStages.Validate.LIMITS)
|
||||
.requires(IrisStages.Validate.SURFACE, IrisStages.Anchor.HEIGHT)
|
||||
.run(ValidateModule::checkLimits);
|
||||
graph.define(ValidateStages.STRUCTURES)
|
||||
.requires(ValidateStages.LIMITS, AnchorStages.HEIGHT)
|
||||
graph.define(IrisStages.Validate.STRUCTURES)
|
||||
.requires(IrisStages.Validate.LIMITS, IrisStages.Anchor.HEIGHT)
|
||||
.run(ValidateModule::checkNativeStructures);
|
||||
graph.define(ValidateStages.COLLISIONS)
|
||||
.requires(ValidateStages.STRUCTURES, AnchorStages.HEIGHT)
|
||||
graph.define(IrisStages.Validate.COLLISIONS)
|
||||
.requires(IrisStages.Validate.STRUCTURES, IrisStages.Anchor.HEIGHT)
|
||||
.run(ValidateModule::checkCollisions);
|
||||
}
|
||||
|
||||
private static void checkSurface(PlacementStageContext context) {
|
||||
IrisPlacement placement = IrisPlacement.current();
|
||||
PreparedPlacement prepared = context.output(PrepareStages.TRANSFORMS);
|
||||
PreparedPlacement prepared = context.output(IrisStages.Prepare.TRANSFORMS);
|
||||
IrisObjectPlacement config = prepared.config();
|
||||
if (config.isForcePlace() || config.isFromBottom() || prepared.mode() == ObjectPlaceMode.FLOATING
|
||||
|| prepared.mode() == ObjectPlaceMode.STRUCTURE_PIECE) {
|
||||
return;
|
||||
}
|
||||
int y = context.output(AnchorStages.HEIGHT).y();
|
||||
int y = context.output(IrisStages.Anchor.HEIGHT).y();
|
||||
boolean sampled = placement.requestedY() < 0;
|
||||
if (sampled && config.getCarvingSupport().supportsSurface() && isOnBedrock(prepared, y)) {
|
||||
warnImplausibleBedrockPlacement(placement, config, y);
|
||||
@@ -109,12 +107,12 @@ public final class ValidateModule implements IrisModule {
|
||||
|
||||
private static void checkLimits(PlacementStageContext context) {
|
||||
IrisPlacement placement = IrisPlacement.current();
|
||||
PreparedPlacement prepared = context.output(PrepareStages.TRANSFORMS);
|
||||
PreparedPlacement prepared = context.output(IrisStages.Prepare.TRANSFORMS);
|
||||
IrisObjectPlacement config = prepared.config();
|
||||
if (config.isForcePlace() || prepared.mode() == ObjectPlaceMode.STRUCTURE_PIECE) {
|
||||
return;
|
||||
}
|
||||
int y = context.output(AnchorStages.HEIGHT).y();
|
||||
int y = context.output(IrisStages.Anchor.HEIGHT).y();
|
||||
int rotated = prepared.rotatedCenterY();
|
||||
int translated = prepared.translatedCenterY();
|
||||
if (placement.requestedY() < 0 && prepared.mode() != ObjectPlaceMode.FLOATING && !config.isUnderwater()
|
||||
@@ -131,11 +129,11 @@ public final class ValidateModule implements IrisModule {
|
||||
}
|
||||
|
||||
private static void checkNativeStructures(PlacementStageContext context) {
|
||||
PreparedPlacement prepared = context.output(PrepareStages.TRANSFORMS);
|
||||
PreparedPlacement prepared = context.output(IrisStages.Prepare.TRANSFORMS);
|
||||
if (prepared.mode() == ObjectPlaceMode.STRUCTURE_PIECE) {
|
||||
return;
|
||||
}
|
||||
int y = context.output(AnchorStages.HEIGHT).y() + prepared.randomY();
|
||||
int y = context.output(IrisStages.Anchor.HEIGHT).y() + prepared.randomY();
|
||||
if (meetsNativeStructure(context, IrisPlacement.current(), prepared, y)) {
|
||||
context.reject("native-structure");
|
||||
}
|
||||
@@ -200,7 +198,7 @@ public final class ValidateModule implements IrisModule {
|
||||
|
||||
private static void checkCollisions(PlacementStageContext context) {
|
||||
IrisPlacement placement = IrisPlacement.current();
|
||||
PreparedPlacement prepared = context.output(PrepareStages.TRANSFORMS);
|
||||
PreparedPlacement prepared = context.output(IrisStages.Prepare.TRANSFORMS);
|
||||
IrisObjectPlacement config = prepared.config();
|
||||
if (config.isForcePlace() || prepared.mode() == ObjectPlaceMode.STRUCTURE_PIECE
|
||||
|| (config.getAllowedCollisions().isEmpty() && config.getForbiddenCollisions().isEmpty())) {
|
||||
@@ -210,7 +208,7 @@ public final class ValidateModule implements IrisModule {
|
||||
if (engine == null) {
|
||||
throw new IllegalStateException("Object placement requires active Iris data for collision settings.");
|
||||
}
|
||||
WorldVolume volume = WorldVolume.of(placement, prepared, context.output(AnchorStages.HEIGHT).y() + prepared.randomY());
|
||||
WorldVolume volume = WorldVolume.of(placement, prepared, context.output(IrisStages.Anchor.HEIGHT).y() + prepared.randomY());
|
||||
if (collidesWithForbiddenObject(engine, config, volume)) {
|
||||
context.reject("object-collision");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user