Commit Graph
122 Commits
Author SHA1 Message Date
piexel 3a307b5b8e Batch 3 of the API review: extension point, resources by kind
- PackWorld, InvocationContext and PackSettings get extension(type),
  an Optional empty by default: the one door a host's own modules use
  to reach its facades. The runners forward the inputs' extensions;
  the world a module sees (ModuleWorld, built by the host) forwards
  the world's. PackWorld.withLog is gone.
- A chunk stage writes registered mantle layers inside its own chunk
  and reads the rest (ChunkMantle); ReadOnlyMantle and its host() are
  gone.
- PackResources.find(kind, id), require(kind, id), ids(kind) and the
  host kinds BIOMES, REGIONS, OBJECTS replace ResourceKey and
  ResourceKind.key. Services and LinkedBiomes name pack resources by
  ResourceId. @Ref(PACK_*) and @ResourceRef fit ResourceId fields.
- BlockAccess extends BlockView.
- Absent values in ItemDrop, EntitySpec and AmbientEffects.Effect are
  Optionals; StructureFit.Start.key() returns a StartKey.
- Mantle.caverns() becomes isCarved(x, y, z).
- OptionsMetadata and DeclaredFieldOrder move to com.volmit.host.
- README, DESIGN and CONTRACTS updated; ExtensionsTest added.
2026-10-24 00:17:10 +02:00
piexel 7143908d4b 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.
2026-10-23 14:17:19 +02:00
piexel 1677f4414b 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.
2026-10-23 13:00:07 +02:00
piexel d3c0e4d6cc Bundled jars: no special case for a pack's own copy
Nothing is released, so a pack holding an old copy of a bundled jar
gets no compatibility handling: it fails like any pack whose jars hold
the same class, naming both ("Class ... is in both module jars
iris-builtins.jar (bundled with the host) and
modules/iris-builtins.jar"). Removes LoadedPack.replacedJars() and the
bundled file name checks. Jar copies in a load's snapshot are named by
their place in the load, so same-named jars from the host and the pack
no longer collide before that check can name them.
2026-10-22 09:55:12 +02:00
piexel 98c090d5b2 A host can bundle module jars that load with every pack
ModuleHost.bundlingJars(...) names jars the host ships itself. Every
pack load copies and loads them as if they were in the pack's modules
folder: first, in the given order, in the pack's class loader, so pack
jars can still require their stages. A pack jar with a bundled jar's
file name, such as an old copy, is left out, so a pack never loads a
stale copy next to the host's; LoadedPack.replacedJars() names it for
the host to tell the owner. Messages name a bundled jar
"<name> (bundled with the host)".

JarSnapshot now takes each jar's origin from its caller, since a
bundled jar does not lie under the pack.
2026-10-22 09:40:22 +02:00
piexel e3e8db3329 Reference.PACK_STRUCTURE: a jigsaw structure of the pack
Lets a settings class name the pack's structures by key without naming the
host's structure class, like PACK_BIOME and PACK_OBJECT.
2026-10-15 13:03:42 +02:00
piexel f44b31edd0 Merge branch 'wave3b/2' 2026-10-15 07:28:26 +02:00
piexel 58ed81032c Merge branch 'wave3b/4'
# Conflicts:
#	README.md
#	src/main/java/com/volmit/world/TerrainSampler.java
2026-10-15 07:13:58 +02:00
piexel 53b838bd3f PackResources keeps one idOf: the lower-casing ofPackKey one both merged branches added 2026-10-15 07:07:36 +02:00
piexel dc28e0ecda Docs: the terrain sampler's biome, kind, ground block, bottom Y and upper dimension, the caverns layer, declaredBy, oreFor, the chunk mantle's reach 2026-10-15 07:07:12 +02:00
piexel b047a2675d Merge branch 'wave3b/5' 2026-10-15 07:06:59 +02:00
piexel 3ab8b88e56 Merge branch 'wave3b/3'
# Conflicts:
#	CONTRACTS.md
2026-10-15 07:06:59 +02:00
piexel 1ea5d70eaa Merge branch 'wave3b/6' 2026-10-15 07:06:52 +02:00
piexel e8443324d4 README, CONTRACTS: signed, scaled, minHeight, idOf and caveBiome 2026-10-12 02:41:19 +02:00
piexel 6e53d7b723 TerrainSampler.surfaceBiome: the id of a column's surface biome alone 2026-10-12 02:19:48 +02:00
piexel 9514464d9a DESIGN: idOf, caveBiome and ReadOnlyMantle.host 2026-10-12 02:16:52 +02:00
piexel a1c27c632b ReadOnlyMantle.host: the host's mantle behind a chunk stage's read-only view, for the host's own extensions 2026-10-12 02:04:00 +02:00
piexel dfdda39667 GenerationContext.mantle covers the chunk and the 16 blocks around it, like terrain() 2026-10-12 02:03:13 +02:00
piexel 4a0d82ea3b BlockRegistry.oreFor: the ore variant that suits the rock it is placed in, which the platform decides 2026-10-10 18:23:25 +02:00
piexel 9013c6e84b TerrainSampler.caveBiome: the cave biome of a block alone 2026-10-10 18:22:21 +02:00
piexel 44c98dcd8b NoiseSampler.scaled: the noise with an extra coordinate scale, folded into the host's generator 2026-10-10 18:19:54 +02:00
piexel 750e0691a6 Structure services answer what Iris core still asked its locator directly: placed keys and the starts a module makes of platform structures
StructureLocator.placed(world) (default: locatable): every key under which locate finds what the module places, its own
structures and the platform structures it starts or stands in for; the host routes locate by it.
VanillaStructures.startedStructures(world), locatableStarts(world) and locateStart(world, structure, fromX, fromZ,
maxRings, ChunkFilter): the platform structures a module starts itself, the ones it can find, and the nearest start of
one, ring by ring through the module's grids, trying only the chunks the host's filter accepts (the platform's /locate
checks each start in the world and asks again without a refused chunk). README, DESIGN, CONTRACTS; test.
2026-10-10 18:18:01 +02:00
piexel 8921042fdb registerHeldType: a pack module may describe a class the host loads (an exposed package), not one of its own jar 2026-10-10 18:15:44 +02:00
piexel 904a6599b3 PackResources.idOf: the id the pack's resources give a resource the pack names by key 2026-10-10 18:14:00 +02:00
piexel 40cb759271 Mantle stages see the terrain at least 16 blocks around their chunk, as chunk stages do 2026-10-10 18:13:46 +02:00
piexel dcbac2ca59 Reference.LOOT_TABLE: an option that names a loot table of the platform 2026-10-10 18:13:36 +02:00
piexel ceac26bd18 PackWorld.minHeight: the platform's Y of the dimension's bottom, for settings that name an absolute world Y 2026-10-10 18:07:22 +02:00
piexel 030cbbb8fc DecorationStep describes itself and its steps (@Desc), so settings that list steps keep their studio descriptions 2026-10-10 18:07:05 +02:00
piexel 24eeeab615 NoiseSampler.signed: the sample mapped to -1..1, which a host may answer from a per-thread coordinate memo 2026-10-10 18:06:46 +02:00
piexel d1a1512a6d TerrainSampler: the surface biome's kind, the world Y of the dimension's bottom, image-map ground blocks and the dimension stacked above; FeatureSettings.declaredBy for biomes that are no column's surface biome 2026-10-10 18:05:50 +02:00
piexel 6eac1a87ca PackBiome.vanillaBiome: the biome vanilla's own rules see a pack biome as 2026-10-10 18:05:50 +02:00
piexel f3d1ff8d13 Mantle.caverns(): where the mantle carved voids for a chunk to take over, read-only like the planned blocks 2026-10-10 18:05:50 +02:00
piexel 8676ebc328 VanillaFeatures service: whether the platform's own placed features run over a world and which steps and features they skip
@Service(ALL): generates(world) (off unless a module turns it on), generatesStep(world, Optional<DecorationStep>)
(empty for a step the API does not name) and generatesFeature(world, feature); any provider may refuse a step or a
feature. Answers depend on the world only; the host asks once per world, step and feature. README services table,
DESIGN services and feature map, CONTRACTS types and host duty; a test that a silent provider leaves the pass off.
2026-10-10 18:04:44 +02:00
piexel cf8b2bb0f6 StructureStep becomes DecorationStep: the platform's decoration steps also order its placed features, which the next service names
Pure rename (and its javadoc); every use in StructureFit, the test and CONTRACTS follows.
2026-10-10 18:04:40 +02:00
piexel 60d4deb0e9 Reference.LOOT_TABLE: an option that names a loot table of the platform 2026-10-10 18:03:52 +02:00
piexel d17a017418 PackResources.idOf: the id a pack gives the resource its files name by a key (ResourceId.ofPackKey) 2026-10-10 18:02:08 +02:00
piexel d2d746734f ModuleJarCheck rejects a module that references a class the host's jar leaves out of an exposed library 2026-10-10 15:19:42 +02:00
piexel 1a319d842b Merge branch 'wave3b/p' 2026-10-10 15:07:18 +02:00
piexel 048e87c5ed Merge branch 'wave3b/g' 2026-10-10 15:07:18 +02:00
piexel 949dd90f10 TerrainSampler.surfaceY: a column's height alone, which a host answers without working out the slope 2026-10-10 14:46:16 +02:00
piexel f99dbc6344 CaveBiomes: a biome's minimum cave depth depends on the world and the biome only, so the host asks once per biome and keeps it 2026-10-10 14:46:16 +02:00
piexel b39c750e26 Service lookups answer from an index the catalog builds once per type instead of filtering every registration per call; a type's @Service annotation is read once 2026-10-10 14:46:07 +02:00
piexel a707b237cf StructureFit.log(): a vanilla structure fit knows the log of the module it was handed to; each provider gets its own fit 2026-10-10 14:25:14 +02:00
piexel e0ffe04a0d ModuleLog: each module's own log, labelled with its id, reached as context.log(), PackWorld.log() and FeatureRegistry.log() 2026-10-10 14:00:38 +02:00
piexel d7de5939d7 Merge branch 'master' into wave3/s 2026-10-10 13:21:43 +02:00
piexel e92de3b38a Docs: how a module reaches the host, shared libraries a host exposes, planned blocks, the chunk sampler's reach, fluid height and upper dimension, VINE and canPlaceOn, stage timings, the missing-key message 2026-10-10 13:16:27 +02:00
piexel bc2db7222f Merge branch 'wave3/l'
# Conflicts:
#	CONTRACTS.md
#	README.md
2026-10-10 13:05:02 +02:00
piexel bda84cc8c8 Merge branch 'wave3/c' 2026-10-10 13:04:54 +02:00
piexel 07cb9a57eb Test the AmbientEffects values 2026-10-10 13:01:33 +02:00
piexel a2bee86c1f Docs: AmbientEffects, Reference.SPECIAL_ENTITY 2026-10-10 13:01:15 +02:00