Docs: AmbientEffects, Reference.SPECIAL_ENTITY

This commit is contained in:
piexel committed 2026-10-10 13:01:15 +02:00
1 parent 284213e9b8
commit a2bee86c1f
3 files changed
+8 -2

No files matched your search

+4 -1
View File
@@ -34,7 +34,7 @@ types that carry them and lists what the Iris adapter still owes.
| Module-owned pack checks | `Validator`, `ValidationContext`, `Problem`, `Severity`, `Subject`, `FeatureRegistry.registerValidator`, host `FeatureCatalog.validators()` |
| Per-world module state | `PackWorld` (`state`), `InvocationContext.world()`, host `WorldStates` |
| Module lifecycle across loads, hotloads and reloads | `ModuleLifecycle`, `FeatureRegistry.registerLifecycle`, host `FeatureCatalog.lifecycles()`, `LifecycleRunner` |
| Host questions answered by modules | `@Service`, `Providers`, `FeatureRegistry.registerService`, host `FeatureCatalog.services(type)` / `service(type)`; services `ObjectsAt`, `StructureLocator` (`LocateResult`), `SaplingGrowth`, `Loot`, `BlockDrops`, `EntitySpawns`; values `ItemDrop`, `EntitySpec`, `ItemRegistry` (`PackResources.items()`) |
| Host questions answered by modules | `@Service`, `Providers`, `FeatureRegistry.registerService`, host `FeatureCatalog.services(type)` / `service(type)`; services `ObjectsAt`, `StructureLocator` (`LocateResult`), `SaplingGrowth`, `Loot`, `BlockDrops`, `EntitySpawns`, `AmbientEffects`; values `ItemDrop`, `EntitySpec`, `ItemRegistry` (`PackResources.items()`) |
| Terrain and settings sampling | `TerrainSampler`, `BiomeSample`, `TerrainSample`, `FeatureSettings` |
| Dense chunk output | `Hunk<T>`, `GenerationContext.hunk`, reference `ArrayHunk<T>` |
| Sparse geometry and transforms | `ObjectGenerator`, `GeneratedObject`, `ObjectTransform`, `ObjectTransformer` |
@@ -184,6 +184,9 @@ running Iris is the pack publisher's responsibility.
- Create what `ItemDrop` and `EntitySpec` describe on the platform, skip what the platform lacks (an unknown enchantment,
attribute or item flag) with a warning, and run the checks that come with an `EntitySpawns.Attempt` (light, surface,
free space) before spawning. Report how many entities appeared with `EntitySpawns.spawned`.
- `AmbientEffects.due`: ask for the player's last sampled position (not every tick's), carry out an `Effect` in the order
sound, particles, commands, potion, skip a part the platform lacks, and give no potion to a player who already has the
same one with a higher amplifier.
- Decode IrisApi's value types like settings: `BlockSpec`, `PaletteSpec`, `NoiseStyle`, `StyledRange`, `Range` and
`BlockPosition` from the JSON shapes in their docs, `Object` as maps, lists, `Double`s, strings and booleans.
Read a `"snippet/<name>"` or `"snippet/<folder>/<name>"` string of a `@Snippet` type from
+2
View File
@@ -969,6 +969,8 @@ from a sapling, which drops a block has. A module answers such questions through
damaged), and the host reads what only the platform knows (light, the surface below, free space, the blocks around a
sapling) through the attempt's conditions or a `Surroundings` view. A service that must hear how its plan went has a
second method for it (`EntitySpawns.spawned`, which keeps a spawner's rate limits).
`AmbientEffects` follows the same rule: the module decides which effects are due (interval and chance, kept in the world's
state) and every random value they carry, the host only plays them.
- **Services now.** `ObjectsAt` (`ALL`): pack object keys a module would place in a chunk, predicted without
generating it, and the biomes and regions whose settings place a given object (`PlacedBy`, named by pack keys; the
host builds its search area from them through the biome tree it owns). `StructureLocator` (`FIRST`): every structure key a module knows, the ones a world places, and the
+2 -1
View File
@@ -295,6 +295,7 @@ final class RuinsObjects implements ObjectsAt {
| `Loot` | `ALL` | The loot tables a container draws from at a `Site` (`Table` of the pack, `PlatformTable` with the seed to draw it with), in the order their items are added, and the `ItemDrop`s one table gives there. The host puts them together, tells listeners, creates the stacks and shuffles the container. |
| `BlockDrops` | `ALL` | What a module drops for a broken block: `ItemDrop`s, and whether the platform's own drops of the block are replaced. |
| `EntitySpawns` | `ALL` | A `Plan` of entities to spawn in a chunk or at a marker, each `Attempt` an `EntitySpec` with the block, light range and surface it needs; how many appeared (`spawned`); what a marker means (`MarkerRule`); one entity of the pack on request. The host checks light, surface and free space, spawns, and applies the spec. |
| `AmbientEffects` | `ALL` | The effects due for a player standing at a position: a `Sound`, `Particles`, `Command`s and a `Potion` per `Effect`, every random choice already made (offsets, scatter, duration). The host asks now and then, carries out the parts the platform has, and keeps a stronger potion effect the player already has. |
| `VanillaStructures` | `ALL` | Rules, starts, shifts and reaches for the platform's own structures, and fitting the terrain to the starts in one chunk through the `BlockAccess` the host hands over (see Vanilla structures). |
```
@@ -408,7 +409,7 @@ public final class FloraSettings implements IrisFeature {
- `@Ref(Reference.X)` says what a `String` or `ResourceId` names, also on lists, sets and arrays of
them, so studio offers the right list: `BLOCK`, `ITEM`, `ENTITY`, `BIOME`, `STRUCTURE`, `STRUCTURE_PREFIX`
(a structure or a family prefix such as `minecraft:village`), `STRUCTURE_SET`, `TEMPLATE_POOL` (a jigsaw template pool),
`POTION_EFFECT` or `ENCHANTMENT` from the server's registries, `NOISE_STYLE` from the host's noise
`POTION_EFFECT`, `ENCHANTMENT` or `SPECIAL_ENTITY` (a mob of another plugin) from the server's registries, `NOISE_STYLE` from the host's noise
styles, or `PACK_BIOME`, `PACK_REGION`, `PACK_OBJECT`, `PACK_EXPRESSION` or `PACK_IMAGE_MAP` of the pack.
The pack kinds fit `String` only, in the form packs use (`desert/dunes`), never `ResourceId`. `BlockState` fields name blocks without it. `@Ref` on any other field fails
the load.