mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-27 00:04:42 +00:00
Batch 2 of the API review: settings stacks, chunk helpers, pack context
- SettingsStack<F> replaces List<Entry<F>> wherever settings stack: entries in level order, values(), dimension(), level(Level) and mostSpecific(). - com.volmit.config.Level replaces FeatureAttachment.Target; FeatureAttachment folds into FeatureDescriptor.targets(). - FeatureSettings.declaredInChunk answers every entry any column of a chunk declares, each once. - ChunkContext gives chunkX/chunkZ, centreX/centreZ and area(). - registerSettings takes several types at once. - ModuleLifecycle.packLoaded(PackContext) carries resources, settings and the module's log. - TerrainSampler.surfaceHeight gives the surface in whole blocks. - Stage contexts drop worldSeed() and resources(); world() always answers. The scoped world is kept per world and module. - Javadoc fixes; README, DESIGN and CONTRACTS updated.
This commit is contained in:
1 parent
1677f4414b
commit
7143908d4b
67 files changed
+870
-423
No files matched your search
@@ -34,7 +34,7 @@ public final class MossModule implements IrisModule {
|
||||
}
|
||||
|
||||
private static void spread(PlacementStageContext context) {
|
||||
var moss = context.configured(MossSettings.class).getFirst().value(); // a placement declares its settings once
|
||||
var moss = context.configured(MossSettings.class).mostSpecific().orElseThrow(); // a placement declares its settings once
|
||||
var anchor = context.output(AnchorModule.HEIGHT).anchor();
|
||||
var access = context.access();
|
||||
int groundY = anchor.y() - 1;
|
||||
|
||||
Reference in new issue
Block a user