mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-30 09:44:24 +00:00
BiomeModule and CustomModule own their stage constants
Core modules no longer take their stage ids from the built-ins jar's IrisStages.
This commit is contained in:
1 parent
b961a5d3b2
commit
0c2aefef20
2 files changed
+10
-3
No files matched your search
@@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
package art.arcane.iris.core.modules;
|
package art.arcane.iris.core.modules;
|
||||||
|
|
||||||
import art.arcane.iris.builtin.IrisStages;
|
|
||||||
import art.arcane.iris.engine.framework.Engine;
|
import art.arcane.iris.engine.framework.Engine;
|
||||||
import art.arcane.iris.engine.object.world.biome.IrisBiome;
|
import art.arcane.iris.engine.object.world.biome.IrisBiome;
|
||||||
import art.arcane.iris.engine.object.world.biome.custom.IrisBiomeCustom;
|
import art.arcane.iris.engine.object.world.biome.custom.IrisBiomeCustom;
|
||||||
@@ -37,13 +36,17 @@ import art.arcane.volmlib.util.matter.slices.BiomeInjectMatter;
|
|||||||
import com.volmit.IrisModule;
|
import com.volmit.IrisModule;
|
||||||
import com.volmit.ModuleInfo;
|
import com.volmit.ModuleInfo;
|
||||||
import com.volmit.ModuleSetup;
|
import com.volmit.ModuleSetup;
|
||||||
|
import com.volmit.stage.ChunkStage;
|
||||||
import com.volmit.stage.ChunkStageContext;
|
import com.volmit.stage.ChunkStageContext;
|
||||||
|
import com.volmit.stage.Stage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Module {@code iris:biome}: writes each column's biome into the chunk's biome hunk, a custom biome under the
|
* Module {@code iris:biome}: writes each column's biome into the chunk's biome hunk, a custom biome under the
|
||||||
* dimension's namespace, and records the biome id in the mantle for platforms that inject biomes later.
|
* dimension's namespace, and records the biome id in the mantle for platforms that inject biomes later.
|
||||||
*/
|
*/
|
||||||
public final class BiomeModule implements IrisModule {
|
public final class BiomeModule implements IrisModule {
|
||||||
|
/** 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 static final String VERSION = "built-in";
|
private static final String VERSION = "built-in";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -53,7 +56,7 @@ public final class BiomeModule implements IrisModule {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setup(ModuleSetup setup) {
|
public void setup(ModuleSetup setup) {
|
||||||
setup.stages().define(IrisStages.Biome.WRITE).run(BiomeModule::write);
|
setup.stages().define(WRITE).run(BiomeModule::write);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void write(ChunkStageContext context) {
|
private static void write(ChunkStageContext context) {
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ import art.arcane.volmlib.util.matter.Matter;
|
|||||||
import com.volmit.IrisModule;
|
import com.volmit.IrisModule;
|
||||||
import com.volmit.ModuleInfo;
|
import com.volmit.ModuleInfo;
|
||||||
import com.volmit.ModuleSetup;
|
import com.volmit.ModuleSetup;
|
||||||
|
import com.volmit.stage.ChunkStage;
|
||||||
import com.volmit.stage.ChunkStageContext;
|
import com.volmit.stage.ChunkStageContext;
|
||||||
|
import com.volmit.stage.Stage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Module {@code iris:custom}: records the chunk's content-plugin blocks for the server to place later: each
|
* Module {@code iris:custom}: records the chunk's content-plugin blocks for the server to place later: each
|
||||||
@@ -39,6 +41,8 @@ import com.volmit.stage.ChunkStageContext;
|
|||||||
* while maintenance regeneration bypasses the mantle.
|
* while maintenance regeneration bypasses the mantle.
|
||||||
*/
|
*/
|
||||||
public final class CustomModule implements IrisModule {
|
public final class CustomModule implements IrisModule {
|
||||||
|
/** 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 static final String VERSION = "built-in";
|
private static final String VERSION = "built-in";
|
||||||
private static final int CHUNK_SHIFT = 4;
|
private static final int CHUNK_SHIFT = 4;
|
||||||
private static final int SECTION_MASK = 15;
|
private static final int SECTION_MASK = 15;
|
||||||
@@ -51,7 +55,7 @@ public final class CustomModule implements IrisModule {
|
|||||||
@Override
|
@Override
|
||||||
public void setup(ModuleSetup setup) {
|
public void setup(ModuleSetup setup) {
|
||||||
// Ordering only: iris:perfection ships in the built-ins jar, which a pack may not have.
|
// Ordering only: iris:perfection ships in the built-ins jar, which a pack may not have.
|
||||||
setup.stages().define(IrisStages.Custom.BLOCKS).softAfter(IrisStages.Perfection.SURFACE).run(CustomModule::record);
|
setup.stages().define(BLOCKS).softAfter(IrisStages.Perfection.SURFACE).run(CustomModule::record);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void record(ChunkStageContext context) {
|
private static void record(ChunkStageContext context) {
|
||||||
|
|||||||
Reference in new issue
Block a user