mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-27 16:25:36 +00:00
Docs: the terrain sampler's biome, kind, ground block, bottom Y and upper dimension, the caverns layer, declaredBy, oreFor, the chunk mantle's reach
This commit is contained in:
1 parent
6e53d7b723
commit
dc28e0ecda
3 files changed
+23
-2
No files matched your search
@@ -131,6 +131,11 @@ running Iris is the pack publisher's responsibility.
|
||||
- Serve `Mantle.blocks()` in every invocation: the blocks placements wrote into the mantle, read-only, none where the
|
||||
dimension keeps no mantle or the chunk generates without it. A block a stage reads and writes back unchanged keeps
|
||||
the host's own identity of it (a custom block of a content plugin stays one).
|
||||
- Serve `Mantle.caverns()` in every invocation (read-only, none where the dimension keeps no mantle) and cover the chunk and the 16 blocks
|
||||
around it in a chunk stage's mantle, as the sampler does.
|
||||
- Answer `TerrainSampler.surfaceBiome(x, z)` (the id `biome(x, y, z).surfaceBiome()` gives), `surfaceKind`, `minWorldY()`, `surfaceBlock` (empty
|
||||
where no image map gives one) and `upperDimension()` (empty when nothing sits above); `FeatureSettings.declaredBy(biome, type)` answers the
|
||||
settings the biome declares itself (empty when it declares none or is unknown); `BlockRegistry.oreFor` answers from the platform.
|
||||
- Answer `TerrainSampler.fluidHeight()` (the height the host fills with fluid below) and `upperDimensionY(x, z)` (where a
|
||||
dimension stacked above begins; empty when none does). `surfaceY(x, z)` equals `column(x, z).surfaceY()`; a host
|
||||
overrides it when the height costs less than the whole column.
|
||||
|
||||
@@ -505,6 +505,16 @@ need no registration, and stages only read them; placements keep writing blocks
|
||||
`ChunkRunner.generate(inputs, seed, timings)` reports how long each stage that ran took, so the host times modules
|
||||
instead of modules timing themselves.
|
||||
|
||||
The ground a chunk stage fills in needs more of the host than heights. `surfaceBiome(x, z)` answers the biome id of a column without working out the
|
||||
cave biome; `surfaceKind` says what that biome was generated as (land, sea or shore; a cave biome is always `CAVE`), `surfaceBlock` the block an image
|
||||
map gives the ground, `minWorldY` the world Y of the dimension's bottom (settings that name world heights, such as a deposit variant's band, are in it), and
|
||||
`upperDimension()` the dimension stacked above, whose own settings (`UpperDimension.settings()`), resources and image-map blocks decide what its ground is
|
||||
made of. A biome that is no column's surface biome, such as the cave biome of a `BiomeSample`, has its settings through `FeatureSettings.declaredBy`.
|
||||
The chunk stage's mantle covers the chunk and the 16 blocks around it like the sampler, so a decoration that attaches to a neighbor sees the blocks
|
||||
placements planned there; `Mantle.caverns()` is the host's read-only layer of carved voids, as `blocks()` is of planned blocks: a void the planner
|
||||
marked need not show in the chunk (under a dimension above, the cave stage leaves it solid), and a stage that places something solid asks it.
|
||||
`BlockRegistry.oreFor(rock, ore)` is the platform's answer to which variant of an ore belongs in a rock.
|
||||
|
||||
## Mantle invocations
|
||||
|
||||
Some work writes beyond its chunk: a carver whose tunnels cross chunk borders, a vein running on into
|
||||
|
||||
@@ -123,8 +123,14 @@ graph.define(APPLY).run(CaveModule::apply); // reads its own chunk's CAVES and
|
||||
A chunk stage writes only its own chunk but may look around it: `ctx.terrain()` covers the chunk and the 16 blocks
|
||||
around it, gives the dimension's `fluidHeight()` and, per column, `upperDimensionY(x, z)` where a dimension stacked above
|
||||
begins (write nothing there). `surfaceY(x, z)` is a column's height alone, cheaper than `column(x, z)` when a stage needs
|
||||
no slope. `ctx.mantle().blocks()` holds the blocks placements wrote into the mantle for the chunks to
|
||||
take over, such as objects and structures; a chunk stage copies them in (Iris's `iris:matter`). Stages only read them.
|
||||
no slope. `surfaceBiome(x, z)` is the id of a column's surface biome alone and `surfaceKind(x, z)` what it was generated as (`BiomeKind`: land, sea,
|
||||
shore); `surfaceBlock(x, z)` is the block an image map gives the ground there, `minWorldY()` the world Y of the dimension's bottom, and
|
||||
`upperDimension()` the dimension stacked above (`UpperDimension`: its own settings, resources and image-map blocks), for a stage that fills in its ground.
|
||||
`ctx.settings().declaredBy(biomeId, Type.class)` reads what a biome declares itself, such as a cave biome of a `BiomeSample`, which is no level of
|
||||
`at(...)`. `ctx.mantle()` covers the same area as the terrain. `ctx.mantle().blocks()` holds the blocks placements wrote into the mantle for the chunks to
|
||||
take over, such as objects and structures; a chunk stage copies them in (Iris's `iris:matter`). `ctx.mantle().caverns()` holds `true` where the cave planner
|
||||
carved a void, whatever the chunk's blocks show there. Stages only read both. `blocks().oreFor(rock, ore)` gives the ore variant that suits the rock
|
||||
(deepslate ores in deepslate), which the platform decides, and `PackBiome.vanillaBiome()` the biome vanilla's rules see a pack biome as.
|
||||
|
||||
```java
|
||||
graph.define(INSERT).run(ctx -> {
|
||||
|
||||
Reference in new issue
Block a user