mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-27 00:04:42 +00:00
Batch 1 of the API review: one setup entry point, per-pipeline definitions
- IrisModule.setup(ModuleSetup) replaces install(StageGraph) and register(FeatureRegistry); ModuleSetups.run is the host entry point. - The conditional definition variants are gone: a stage body reads the settings it is conditioned on through ctx.configured(Type.class). - Placement, block, chunk and mantle stages each get their own definition interface; chunk definitions offer neither reach nor writesMantle. MantleStage is no longer generic. - softAfter/softBefore take stage constants as well as StageRefs. - A producer that rejected the attempt may return null. - PlacementRunner, ChunkRunner and MantleRunner all take StageTimings. - ConfiguredSettings groups entries by the type that declares @Feature. - README, DESIGN and CONTRACTS updated, with the edge choice table.
This commit is contained in:
1 parent
d3c0e4d6cc
commit
1677f4414b
75 files changed
+1201
-838
No files matched your search
@@ -1,6 +1,8 @@
|
||||
package com.volmit.host;
|
||||
|
||||
import com.volmit.IrisFeature;
|
||||
import com.volmit.config.FeatureSettings;
|
||||
import com.volmit.config.FeatureSettings.Entry;
|
||||
import com.volmit.object.ObjectBlock;
|
||||
import com.volmit.object.ObjectTransformer;
|
||||
import com.volmit.placement.PlacementAccess;
|
||||
@@ -13,6 +15,7 @@ import com.volmit.stage.BlockStageContext;
|
||||
import com.volmit.stage.Stage;
|
||||
import com.volmit.world.BlockView;
|
||||
import com.volmit.world.TerrainSampler;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/** The context every stage of one placement attempt receives. Block accessors work only while
|
||||
@@ -70,6 +73,11 @@ final class PlacementInvocation implements BlockStageContext {
|
||||
return stages.output(stage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <S extends IrisFeature> List<Entry<S>> configured(Class<S> settingsType) {
|
||||
return stages.configured(settingsType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlacementRequest request() {
|
||||
return request;
|
||||
|
||||
Reference in new issue
Block a user