From 65cd0c3e7cabb0d158badaba9ff864418b35dd4f Mon Sep 17 00:00:00 2001 From: Christian Bergschneider Date: Fri, 2 Oct 2026 22:54:19 +0200 Subject: [PATCH 1/2] docs: add full IDE meta to most terra addons --- .../src/main/kotlin/DistributionConfig.kt | 10 + .../resources/META-INF/api/config.terradoc | 215 + .../resources/META-INF/api/config.terradoc | 118 + .../resources/META-INF/api/config.terradoc | 420 ++ .../resources/META-INF/api/config.terradoc | 25 + .../resources/META-INF/api/config.terradoc | 388 ++ .../resources/META-INF/api/config.terradoc | 120 + .../resources/META-INF/api/config.terradoc | 206 + .../resources/META-INF/api/config.terradoc | 183 + .../resources/META-INF/api/config.terradoc | 207 + .../resources/META-INF/api/config.terradoc | 388 ++ .../resources/META-INF/api/config.terradoc | 6039 +++++++++++++++++ .../resources/META-INF/api/config.terradoc | 16 + .../resources/META-INF/api/config.terradoc | 253 + .../resources/META-INF/api/config.terradoc | 204 + .../resources/META-INF/api/config.terradoc | 99 + .../resources/META-INF/api/config.terradoc | 520 ++ .../resources/META-INF/api/config.terradoc | 26 + .../resources/META-INF/api/config.terradoc | 29 + .../resources/META-INF/api/config.terradoc | 110 + .../resources/META-INF/api/config.terradoc | 29 + .../resources/META-INF/api/config.terradoc | 11 + .../resources/META-INF/api/config.terradoc | 11 + .../main/resources/META-INF/api/core.terradoc | 265 + .../resources/META-INF/api/config.terradoc | 314 + 25 files changed, 10206 insertions(+) create mode 100644 common/addons/biome-provider-extrusion/src/main/resources/META-INF/api/config.terradoc create mode 100644 common/addons/biome-provider-image/src/main/resources/META-INF/api/config.terradoc create mode 100644 common/addons/biome-provider-pipeline/src/main/resources/META-INF/api/config.terradoc create mode 100644 common/addons/biome-provider-single/src/main/resources/META-INF/api/config.terradoc create mode 100644 common/addons/chunk-generator-noise-3d/src/main/resources/META-INF/api/config.terradoc create mode 100644 common/addons/config-biome/src/main/resources/META-INF/api/config.terradoc create mode 100644 common/addons/config-distributors/src/main/resources/META-INF/api/config.terradoc create mode 100644 common/addons/config-feature/src/main/resources/META-INF/api/config.terradoc create mode 100644 common/addons/config-flora/src/main/resources/META-INF/api/config.terradoc create mode 100644 common/addons/config-locators/src/main/resources/META-INF/api/config.terradoc create mode 100644 common/addons/config-noise-function/src/main/resources/META-INF/api/config.terradoc create mode 100644 common/addons/config-number-predicate/src/main/resources/META-INF/api/config.terradoc create mode 100644 common/addons/config-ore/src/main/resources/META-INF/api/config.terradoc create mode 100644 common/addons/config-palette/src/main/resources/META-INF/api/config.terradoc create mode 100644 common/addons/generation-stage-feature/src/main/resources/META-INF/api/config.terradoc create mode 100644 common/addons/library-image/src/main/resources/META-INF/api/config.terradoc create mode 100644 common/addons/locator-slant-noise-3d/src/main/resources/META-INF/api/config.terradoc create mode 100644 common/addons/palette-block-shortcut/src/main/resources/META-INF/api/config.terradoc create mode 100644 common/addons/pipeline-image/src/main/resources/META-INF/api/config.terradoc create mode 100644 common/addons/structure-block-shortcut/src/main/resources/META-INF/api/config.terradoc create mode 100644 common/addons/structure-sponge-loader/src/main/resources/META-INF/api/config.terradoc create mode 100644 common/addons/structure-terrascript-loader/src/main/resources/META-INF/api/config.terradoc create mode 100644 common/implementation/base/src/main/resources/META-INF/api/core.terradoc create mode 100644 platforms/minestom/src/main/resources/META-INF/api/config.terradoc diff --git a/buildSrc/src/main/kotlin/DistributionConfig.kt b/buildSrc/src/main/kotlin/DistributionConfig.kt index 0ad6c44914..72c3f4d26c 100644 --- a/buildSrc/src/main/kotlin/DistributionConfig.kt +++ b/buildSrc/src/main/kotlin/DistributionConfig.kt @@ -43,6 +43,16 @@ private fun Project.installAddonsInto(dest: Path) { fun Project.configureDistribution() { apply(plugin = "com.gradleup.shadow") + + listOf("jar", "shadowJar").forEach { taskName -> + tasks.named(taskName) { + manifest.attributes(mapOf( + "Implementation-Title" to "Terra", + "Implementation-Version" to project.version.toString(), + "Terra-Platform" to project.name + )) + } + } val downloadDefaultPacks = tasks.create("downloadDefaultPacks") { group = "terra" diff --git a/common/addons/biome-provider-extrusion/src/main/resources/META-INF/api/config.terradoc b/common/addons/biome-provider-extrusion/src/main/resources/META-INF/api/config.terradoc new file mode 100644 index 0000000000..bfe0d20eac --- /dev/null +++ b/common/addons/biome-provider-extrusion/src/main/resources/META-INF/api/config.terradoc @@ -0,0 +1,215 @@ +{ + "id": "biome-provider-extrusion", + "docVersion": 1, + "description": "EXTRUSION biome provider and SET/REPLACE vertical extrusion variants.", + "types": { + "terra:BiomeProvider": { + "kind": "union", + "discriminator": "type", + "values": { + "EXTRUSION": { + "kind": "object", + "fields": { + "provider": { + "schema": { + "kind": "type", + "target": "terra:BiomeProvider" + }, + "required": true + }, + "resolution": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 4 + }, + "extrusions": { + "schema": { + "kind": "list", + "element": { + "kind": "type", + "target": "Extrusion" + } + }, + "required": true, + "summary": "Ordered extrusion steps." + } + } + } + } + }, + "Extrusion": { + "kind": "union", + "discriminator": "type", + "values": { + "SET": { + "kind": "object", + "fields": { + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + }, + "range": { + "schema": { + "kind": "type", + "target": "terra:Range" + }, + "required": true + }, + "to": { + "schema": { + "kind": "type", + "target": "WeightedBiomes" + }, + "required": true + } + }, + "description": "Selects a replacement biome within the height range." + }, + "REPLACE": { + "kind": "object", + "fields": { + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + }, + "range": { + "schema": { + "kind": "type", + "target": "terra:Range" + }, + "required": true + }, + "to": { + "schema": { + "kind": "type", + "target": "WeightedBiomes" + }, + "required": true + }, + "from": { + "schema": { + "kind": "type", + "target": "terra:Tag" + }, + "required": true, + "summary": "Biome tag required before replacing." + } + }, + "description": "Replaces biomes matching from within the height range." + } + } + }, + "ReplaceableBiome": { + "kind": "oneOf", + "options": [ + { + "kind": "ref", + "target": "terra:Biome" + }, + { + "kind": "literal", + "value": "SELF", + "description": "Keep the input biome at this extrusion step." + } + ], + "description": "Registered biome identifier or SELF. Unknown identifiers are rejected rather than becoming placeholders." + }, + "WeightedBiomes": { + "kind": "oneOf", + "description": "Replaceable biome, biome-to-weight map, or list of maps. Singleton weights are ignored; all other weights are raw integers.", + "options": [ + { + "kind": "type", + "target": "ReplaceableBiome" + }, + { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "ReplaceableBiome" + }, + "values": { + "kind": "any", + "name": "Ignored singleton weight" + }, + "maxEntries": 1 + }, + { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "ReplaceableBiome" + }, + "values": { + "kind": "integer" + }, + "minEntries": 2 + }, + { + "kind": "list", + "element": { + "kind": "oneOf", + "options": [ + { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "ReplaceableBiome" + }, + "values": { + "kind": "any", + "name": "Ignored singleton weight" + }, + "maxEntries": 1 + }, + { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "ReplaceableBiome" + }, + "values": { + "kind": "integer" + }, + "minEntries": 2 + } + ] + }, + "maxItems": 1 + }, + { + "kind": "list", + "element": { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "ReplaceableBiome" + }, + "values": { + "kind": "integer" + } + }, + "minItems": 2 + } + ] + } + } +} diff --git a/common/addons/biome-provider-image/src/main/resources/META-INF/api/config.terradoc b/common/addons/biome-provider-image/src/main/resources/META-INF/api/config.terradoc new file mode 100644 index 0000000000..35f2f2e1b2 --- /dev/null +++ b/common/addons/biome-provider-image/src/main/resources/META-INF/api/config.terradoc @@ -0,0 +1,118 @@ +{ + "id": "biome-provider-image", + "docVersion": 1, + "description": "Image biome provider with registered Biome outputs.", + "types": { + "terra:BiomeProvider": { + "kind": "union", + "discriminator": "type", + "values": { + "IMAGE": { + "kind": "object", + "fields": { + "resolution": { + "schema": { + "kind": "integer", + "nullable": true + }, + "required": false, + "default": 1 + }, + "color-sampler": { + "schema": { + "kind": "type", + "target": "library-image:ColorSampler" + }, + "required": true + }, + "color-conversion": { + "schema": { + "kind": "type", + "target": "ColorConverter" + }, + "required": true + } + } + } + } + }, + "ColorConverter": { + "kind": "union", + "discriminator": "type", + "values": { + "EXACT": { + "kind": "object", + "fields": { + "match": { + "schema": { + "kind": "type", + "target": "ColorMapping" + }, + "required": true + }, + "else": { + "schema": { + "kind": "ref", + "target": "terra:Biome" + }, + "required": true, + "summary": "Required fallback for colors with no exact mapping." + }, + "ignore-alpha": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": true + } + }, + "description": "Exact color matching with a fallback; alpha is ignored by default." + }, + "CLOSEST": { + "kind": "object", + "fields": { + "match": { + "schema": { + "kind": "type", + "target": "ColorMapping" + }, + "required": true + } + }, + "description": "Closest color using summed absolute RGB differences; alpha is ignored. An empty map cannot produce a biome." + } + } + }, + "ColorMapping": { + "kind": "union", + "discriminator": "type", + "values": { + "USE_BIOME_COLORS": { + "kind": "object", + "fields": {}, + "description": "Build the mapping from registered Terra biome color values." + }, + "MAP": { + "kind": "object", + "fields": { + "map": { + "schema": { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "library-image:Color" + }, + "values": { + "kind": "ref", + "target": "terra:Biome" + } + }, + "required": true + } + } + } + } + } + } +} diff --git a/common/addons/biome-provider-pipeline/src/main/resources/META-INF/api/config.terradoc b/common/addons/biome-provider-pipeline/src/main/resources/META-INF/api/config.terradoc new file mode 100644 index 0000000000..c41b54fa81 --- /dev/null +++ b/common/addons/biome-provider-pipeline/src/main/resources/META-INF/api/config.terradoc @@ -0,0 +1,420 @@ +{ + "id": "biome-provider-pipeline", + "docVersion": 1, + "description": "Pipeline biome provider, sampler source and six grid-processing stages. Pipeline stages are distinct from world generation stages.", + "types": { + "terra:BiomeProvider": { + "kind": "union", + "values": { + "PIPELINE": { + "kind": "object", + "fields": { + "resolution": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 1, + "summary": "Biome sample spacing in blocks. Higher values reduce work and detail; there is no template range validator." + }, + "blend": { + "schema": { + "kind": "object", + "fields": { + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler", + "nullable": true + }, + "required": false, + "summary": "Coordinate-warping sampler; defaults to an internal zero sampler." + }, + "amplitude": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0 + } + }, + "nullable": true + }, + "required": false + }, + "pipeline": { + "schema": { + "kind": "object", + "fields": { + "source": { + "schema": { + "kind": "type", + "target": "Source" + }, + "required": true + }, + "stages": { + "schema": { + "kind": "list", + "element": { + "kind": "type", + "target": "Stage" + } + }, + "required": true, + "summary": "Ordered stages; required even when the list is empty." + } + } + }, + "required": true + } + } + } + } + }, + "Source": { + "kind": "union", + "discriminator": "type", + "values": { + "SAMPLER": { + "kind": "object", + "fields": { + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + }, + "biomes": { + "schema": { + "kind": "type", + "target": "WeightedPipelineBiomes" + }, + "required": true + } + } + } + } + }, + "Stage": { + "kind": "union", + "discriminator": "type", + "values": { + "FRACTAL_EXPAND": { + "kind": "object", + "fields": { + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true, + "summary": "Sampler used to choose among replacements or neighboring biomes." + } + }, + "description": "Expands the biome grid using fractal interpolation." + }, + "SMOOTH": { + "kind": "object", + "fields": { + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true, + "summary": "Sampler used to choose among replacements or neighboring biomes." + } + }, + "description": "Smooths the biome grid using neighboring biomes." + }, + "REPLACE": { + "kind": "object", + "fields": { + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true, + "summary": "Sampler used to choose among replacements or neighboring biomes." + }, + "from": { + "schema": { + "kind": "type", + "target": "terra:Tag" + }, + "required": true, + "summary": "Tag identifying biomes to replace." + }, + "to": { + "schema": { + "kind": "type", + "target": "WeightedPipelineBiomes" + }, + "required": true, + "summary": "Replacement biomes; SELF preserves the current biome." + } + } + }, + "REPLACE_LIST": { + "kind": "object", + "fields": { + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true, + "summary": "Sampler used to choose among replacements or neighboring biomes." + }, + "default-from": { + "schema": { + "kind": "type", + "target": "terra:Tag" + }, + "required": true, + "summary": "Tag to match when the current biome is not a key in to." + }, + "default-to": { + "schema": { + "kind": "type", + "target": "WeightedPipelineBiomes" + }, + "required": true, + "summary": "Replacement distribution for default-from." + }, + "to": { + "schema": { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "PipelineBiome" + }, + "values": { + "kind": "type", + "target": "WeightedPipelineBiomes" + } + }, + "required": true, + "summary": "Explicit per-biome replacements, checked before the default tag." + } + } + }, + "BORDER": { + "kind": "object", + "fields": { + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true, + "summary": "Sampler used to choose among replacements or neighboring biomes." + }, + "from": { + "schema": { + "kind": "type", + "target": "terra:Tag" + }, + "required": true, + "summary": "Tag to look for among the eight neighboring cells." + }, + "replace": { + "schema": { + "kind": "type", + "target": "terra:Tag" + }, + "required": true, + "summary": "Tag that the center biome must have." + }, + "to": { + "schema": { + "kind": "type", + "target": "WeightedPipelineBiomes" + }, + "required": true, + "summary": "Replacement biomes when the center and a neighbor match." + } + } + }, + "BORDER_LIST": { + "kind": "object", + "fields": { + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true, + "summary": "Sampler used to choose among replacements or neighboring biomes." + }, + "from": { + "schema": { + "kind": "type", + "target": "terra:Tag" + }, + "required": true, + "summary": "Tag to look for among the eight neighboring cells." + }, + "default-replace": { + "schema": { + "kind": "type", + "target": "terra:Tag" + }, + "required": true, + "summary": "Required tag for the center biome, including explicit map entries." + }, + "default-to": { + "schema": { + "kind": "type", + "target": "WeightedPipelineBiomes" + }, + "required": true, + "summary": "Replacement when the center has no entry in replace." + }, + "replace": { + "schema": { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "PipelineBiome" + }, + "values": { + "kind": "type", + "target": "WeightedPipelineBiomes" + } + }, + "required": true, + "summary": "Explicit center-biome replacements after tag and neighbor checks." + } + } + } + } + }, + "PipelineBiome": { + "kind": "oneOf", + "description": "Pipeline biome loader input: a registered biome identifier, SELF, or an unregistered placeholder string. Placeholders must be removed before producing final biomes.", + "options": [ + { + "kind": "ref", + "target": "terra:Biome" + }, + { + "kind": "literal", + "value": "SELF", + "description": "Keep the current biome when used as a stage replacement." + }, + { + "kind": "string", + "description": "An identifier not found in the biome registry becomes a placeholder with tags ALL and its own identifier." + } + ], + "examples": [ + "PLAINS", + "SELF", + "PLACEHOLDER" + ] + }, + "WeightedPipelineBiomes": { + "kind": "oneOf", + "description": "A pipeline biome, a pipeline-biome-to-integer-weight map, or a list of such maps. Singleton weights are ignored. Other weights are raw integers.", + "options": [ + { + "kind": "type", + "target": "PipelineBiome" + }, + { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "PipelineBiome" + }, + "values": { + "kind": "any", + "name": "Ignored singleton weight" + }, + "maxEntries": 1 + }, + { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "PipelineBiome" + }, + "values": { + "kind": "integer" + }, + "minEntries": 2 + }, + { + "kind": "list", + "element": { + "kind": "oneOf", + "options": [ + { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "PipelineBiome" + }, + "values": { + "kind": "any", + "name": "Ignored singleton weight" + }, + "maxEntries": 1 + }, + { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "PipelineBiome" + }, + "values": { + "kind": "integer" + }, + "minEntries": 2 + } + ] + }, + "maxItems": 1 + }, + { + "kind": "list", + "element": { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "PipelineBiome" + }, + "values": { + "kind": "integer" + } + }, + "minItems": 2 + } + ] + } + } +} diff --git a/common/addons/biome-provider-single/src/main/resources/META-INF/api/config.terradoc b/common/addons/biome-provider-single/src/main/resources/META-INF/api/config.terradoc new file mode 100644 index 0000000000..e682c2579d --- /dev/null +++ b/common/addons/biome-provider-single/src/main/resources/META-INF/api/config.terradoc @@ -0,0 +1,25 @@ +{ + "id": "biome-provider-single", + "docVersion": 1, + "description": "A biome provider that returns one registered biome everywhere.", + "types": { + "terra:BiomeProvider": { + "kind": "union", + "values": { + "SINGLE": { + "kind": "object", + "fields": { + "biome": { + "schema": { + "kind": "ref", + "target": "terra:Biome" + }, + "required": true, + "summary": "Registered Terra biome to use everywhere." + } + } + } + } + } + } +} diff --git a/common/addons/chunk-generator-noise-3d/src/main/resources/META-INF/api/config.terradoc b/common/addons/chunk-generator-noise-3d/src/main/resources/META-INF/api/config.terradoc new file mode 100644 index 0000000000..96e3ec4090 --- /dev/null +++ b/common/addons/chunk-generator-noise-3d/src/main/resources/META-INF/api/config.terradoc @@ -0,0 +1,388 @@ +{ + "id": "chunk-generator-noise-3d", + "docVersion": 1, + "description": "Registers NOISE_3D and contributes pack options and biome terrain, carving and palette fields whenever this addon loads. Existing core metadata documents blend.terrain.elevation (default 4).", + "types": { + "terra:PaletteReference": { + "kind": "oneOf", + "options": [ + { + "kind": "ref", + "target": "terra:Palette" + } + ] + }, + "HeightPalettes": { + "kind": "list", + "element": { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "terra:PaletteReference" + }, + "values": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + } + }, + "description": "Palette references mapped to inclusive upper Y boundaries, in a sequence of maps. Duplicate heights replace earlier entries. At least one entry is needed, and the highest boundary must cover the builder's range through Y=255. Boundary values may be numeric expressions.", + "minItems": 1 + }, + "SlantLayer": { + "kind": "object", + "fields": { + "threshold": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Slant threshold. Derivative uses the floor threshold; DotProduct uses the ceiling threshold. Multiple slant layers must use distinct thresholds." + }, + "palette": { + "schema": { + "kind": "type", + "target": "HeightPalettes" + }, + "required": true + } + } + }, + "terra:Biome": { + "kind": "object", + "fields": { + "terrain": { + "schema": { + "kind": "object", + "fields": { + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true, + "summary": "Required terrain-density sampler." + }, + "sampler-2d": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler", + "nullable": true + }, + "required": false, + "summary": "Elevation sampler; defaults to an internal zero sampler." + }, + "blend": { + "schema": { + "kind": "object", + "fields": { + "distance": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 3, + "summary": "Blend radius in sample steps." + }, + "weight": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 1 + }, + "step": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 4, + "summary": "Distance between blend samples." + }, + "weight-2d": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 1 + } + }, + "nullable": true + }, + "required": false + } + } + }, + "required": true + }, + "carving": { + "schema": { + "kind": "object", + "fields": { + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler", + "nullable": true + }, + "required": false, + "summary": "Carving sampler; defaults to an internal zero sampler." + }, + "update-palette": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": false, + "summary": "Update palette depth when carving removes blocks." + } + }, + "nullable": true + }, + "required": false + }, + "palette": { + "schema": { + "kind": "type", + "target": "HeightPalettes" + }, + "required": true, + "summary": "Height-indexed terrain palettes." + }, + "slant": { + "schema": { + "kind": "list", + "element": { + "kind": "type", + "target": "SlantLayer" + }, + "nullable": true + }, + "required": false, + "default": [], + "summary": "Optional palettes selected by terrain slant." + }, + "slant-depth": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2147483647, + "summary": "Maximum depth at which to apply a slant palette." + }, + "ocean": { + "schema": { + "kind": "object", + "fields": { + "level": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Sea level." + }, + "palette": { + "schema": { + "kind": "type", + "target": "terra:PaletteReference", + "nullable": true + }, + "required": false, + "summary": "Defaults to an internal palette returning platform air." + } + }, + "nullable": true + }, + "required": false + } + } + }, + "Noise3DGenerator": { + "kind": "literal", + "value": "NOISE_3D", + "description": "Registered chunk generator provider identifier. generator in pack.yml is a scalar identifier, not an inline object." + }, + "terra:ChunkGenerator": { + "kind": "string", + "description": "This addon registers the NOISE_3D chunk generator provider identifier.", + "examples": [ + "NOISE_3D" + ] + } + }, + "files": { + "pack.yml": { + "kind": "object", + "fields": { + "carving": { + "schema": { + "kind": "object", + "fields": { + "resolution": { + "schema": { + "kind": "object", + "fields": { + "horizontal": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 4 + }, + "vertical": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2 + } + }, + "nullable": true + }, + "required": false + } + }, + "nullable": true + }, + "required": false + }, + "slant": { + "schema": { + "kind": "object", + "fields": { + "calculation-method": { + "schema": { + "kind": "enum", + "values": [ + "DotProduct", + "Derivative" + ], + "nullable": true + }, + "required": false, + "default": "Derivative", + "summary": "Slant calculation method; spelling is case-sensitive." + }, + "disable-palettes": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": false, + "summary": "Disable use of slant palettes; the biome slant fields are still loaded." + } + }, + "nullable": true + }, + "required": false + } + } + }, + "BIOME": { + "kind": "object", + "fields": {}, + "extends": [ + "terra:Biome" + ] + } + } +} diff --git a/common/addons/config-biome/src/main/resources/META-INF/api/config.terradoc b/common/addons/config-biome/src/main/resources/META-INF/api/config.terradoc new file mode 100644 index 0000000000..3b31e93a45 --- /dev/null +++ b/common/addons/config-biome/src/main/resources/META-INF/api/config.terradoc @@ -0,0 +1,120 @@ +{ + "id": "config-biome", + "docVersion": 1, + "description": "Registered biome configurations and a height-indexed palette-holder loader. Other addons contribute terrain, decoration and platform fields.", + "types": { + "terra:Biome": { + "kind": "object", + "fields": { + "id": { + "schema": { + "kind": "string", + "pattern": "^[a-zA-Z0-9_-]*$" + }, + "required": true, + "summary": "Registry identifier; must be present on this file even when inherited." + }, + "extends": { + "schema": { + "kind": "list", + "element": { + "kind": "string" + }, + "nullable": true + }, + "required": false, + "default": [], + "summary": "Parent configuration identifiers. This field is final and is read from the current file." + }, + "vanilla": { + "schema": { + "kind": "type", + "target": "terra:PlatformBiome" + }, + "required": true, + "summary": "Platform biome used for vanilla behavior." + }, + "color": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Biome mapping color; runtime forces the alpha byte to 0xff. Final: not inherited." + }, + "tags": { + "schema": { + "kind": "set", + "element": { + "kind": "type", + "target": "terra:Tag" + }, + "nullable": true + }, + "required": false, + "default": [], + "summary": "User tags; runtime also adds ALL and BIOME:." + } + } + }, + "PaletteHolder": { + "kind": "list", + "element": { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "terra:PaletteReference" + }, + "values": { + "kind": "integer" + } + }, + "description": "Sequence of palette-reference to inclusive upper-Y maps. This loader reads raw integer map values, without numeric expression preprocessing. Heights select the first upper boundary at or above Y; duplicate heights replace earlier entries. Empty input cannot build a holder." + }, + "terra:PaletteReference": { + "kind": "oneOf", + "options": [ + { + "kind": "ref", + "target": "terra:Palette" + } + ] + } + }, + "files": { + "BIOME": { + "kind": "object", + "fields": { + "type": { + "schema": { + "kind": "literal", + "value": "BIOME" + }, + "required": true + }, + "abstract": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": false, + "summary": "Abstract configurations are inherited rather than registered." + } + }, + "extends": [ + "terra:Biome" + ] + } + } +} diff --git a/common/addons/config-distributors/src/main/resources/META-INF/api/config.terradoc b/common/addons/config-distributors/src/main/resources/META-INF/api/config.terradoc new file mode 100644 index 0000000000..186d30f499 --- /dev/null +++ b/common/addons/config-distributors/src/main/resources/META-INF/api/config.terradoc @@ -0,0 +1,206 @@ +{ + "id": "config-distributors", + "docVersion": 1, + "description": "Eight registered distributor variants and explicit x/z point objects.", + "types": { + "terra:Distributor": { + "kind": "union", + "discriminator": "type", + "values": { + "AND": { + "kind": "object", + "fields": { + "distributors": { + "schema": { + "kind": "list", + "element": { + "kind": "type", + "target": "terra:Distributor" + }, + "minItems": 1 + }, + "required": true + } + }, + "description": "Combines a nonempty list of distributor predicates using AND." + }, + "OR": { + "kind": "object", + "fields": { + "distributors": { + "schema": { + "kind": "list", + "element": { + "kind": "type", + "target": "terra:Distributor" + }, + "minItems": 1 + }, + "required": true + } + }, + "description": "Combines a nonempty list of distributor predicates using OR." + }, + "XOR": { + "kind": "object", + "fields": { + "distributors": { + "schema": { + "kind": "list", + "element": { + "kind": "type", + "target": "terra:Distributor" + }, + "minItems": 1 + }, + "required": true + } + }, + "description": "Combines a nonempty list of distributor predicates using XOR." + }, + "YES": { + "kind": "object", + "fields": {}, + "description": "Accepts every column." + }, + "NO": { + "kind": "object", + "fields": {}, + "description": "Rejects every column." + }, + "SAMPLER": { + "kind": "object", + "fields": { + "threshold": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0 + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + } + }, + "description": "Accepts a column when its 2D sampler value is strictly less than threshold." + }, + "POINTS": { + "kind": "object", + "fields": { + "points": { + "schema": { + "kind": "set", + "element": { + "kind": "type", + "target": "Point" + } + }, + "required": true + } + }, + "description": "Matches the configured x/z positions." + }, + "PADDED_GRID": { + "kind": "object", + "fields": { + "width": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + }, + "padding": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + } + }, + "description": "Chooses a seeded point inside each width-sized square separated by padding. No template numeric bounds are enforced; zero width or cell width can fail during sampling." + } + } + }, + "Point": { + "kind": "object", + "fields": { + "x": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + }, + "z": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + } + } + } + } +} diff --git a/common/addons/config-feature/src/main/resources/META-INF/api/config.terradoc b/common/addons/config-feature/src/main/resources/META-INF/api/config.terradoc new file mode 100644 index 0000000000..74a66500de --- /dev/null +++ b/common/addons/config-feature/src/main/resources/META-INF/api/config.terradoc @@ -0,0 +1,183 @@ +{ + "id": "config-feature", + "docVersion": 1, + "description": "FEATURE files register configured placement features, with inline distributor/locator definitions and weighted raw structure references.", + "types": { + "terra:Feature": { + "kind": "object", + "fields": { + "id": { + "schema": { + "kind": "string", + "pattern": "^[a-zA-Z0-9_-]*$" + }, + "required": true, + "summary": "Registry identifier; final and not inherited." + }, + "distributor": { + "schema": { + "kind": "type", + "target": "terra:Distributor" + }, + "required": true + }, + "locator": { + "schema": { + "kind": "type", + "target": "terra:Locator" + }, + "required": true + }, + "structures": { + "schema": { + "kind": "object", + "fields": { + "distribution": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true, + "summary": "Sampler that chooses a structure from the weighted collection." + }, + "structures": { + "schema": { + "kind": "type", + "target": "WeightedStructures" + }, + "required": true + } + } + }, + "required": true + } + } + }, + "terra:StructureReference": { + "kind": "oneOf", + "options": [ + { + "kind": "ref", + "target": "terra:Structure" + } + ] + }, + "WeightedStructures": { + "kind": "oneOf", + "description": "A raw structure reference, reference-to-weight map, or list of maps. Singleton weights are ignored; all other weights are raw integers.", + "options": [ + { + "kind": "type", + "target": "terra:StructureReference" + }, + { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "terra:StructureReference" + }, + "values": { + "kind": "any", + "name": "Ignored singleton weight" + }, + "maxEntries": 1 + }, + { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "terra:StructureReference" + }, + "values": { + "kind": "integer" + }, + "minEntries": 2 + }, + { + "kind": "list", + "element": { + "kind": "oneOf", + "options": [ + { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "terra:StructureReference" + }, + "values": { + "kind": "any", + "name": "Ignored singleton weight" + }, + "maxEntries": 1 + }, + { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "terra:StructureReference" + }, + "values": { + "kind": "integer" + }, + "minEntries": 2 + } + ] + }, + "maxItems": 1 + }, + { + "kind": "list", + "element": { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "terra:StructureReference" + }, + "values": { + "kind": "integer" + } + }, + "minItems": 2 + } + ] + } + }, + "files": { + "FEATURE": { + "kind": "object", + "fields": { + "type": { + "schema": { + "kind": "literal", + "value": "FEATURE" + }, + "required": true + }, + "extends": { + "schema": { + "kind": "list", + "element": { + "kind": "string" + }, + "nullable": true + }, + "required": false, + "default": [], + "summary": "Parent configuration IDs; non-final fields may be inherited." + }, + "abstract": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": false, + "summary": "Abstract configurations supply inherited values and are not registered." + } + }, + "extends": [ + "terra:Feature" + ] + } + } +} diff --git a/common/addons/config-flora/src/main/resources/META-INF/api/config.terradoc b/common/addons/config-flora/src/main/resources/META-INF/api/config.terradoc new file mode 100644 index 0000000000..47470ef4f0 --- /dev/null +++ b/common/addons/config-flora/src/main/resources/META-INF/api/config.terradoc @@ -0,0 +1,207 @@ +{ + "id": "config-flora", + "docVersion": 1, + "description": "FLORA configurations register layered block structures in the raw structure registry.", + "types": { + "Flora": { + "kind": "object", + "fields": { + "id": { + "schema": { + "kind": "string", + "pattern": "^[a-zA-Z0-9_-]*$" + }, + "required": true, + "summary": "Registry identifier; final and not inherited." + }, + "rotatable": { + "schema": { + "kind": "type", + "target": "terra:MaterialSet", + "nullable": true + }, + "required": false, + "default": [], + "summary": "Block types whose states may be rotated." + }, + "physics": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": false + }, + "ceiling": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": false + }, + "layers": { + "schema": { + "kind": "list", + "element": { + "kind": "type", + "target": "BlockLayer" + } + }, + "required": true + }, + "layer-distribution": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + } + } + }, + "BlockLayer": { + "kind": "object", + "fields": { + "layers": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + }, + "materials": { + "schema": { + "kind": "type", + "target": "WeightedBlocks" + }, + "required": true + } + } + }, + "WeightedBlocks": { + "kind": "oneOf", + "description": "A block state, block-to-weight map, or list of maps. Singleton weights are ignored; all other weights are raw integers.", + "options": [ + { + "kind": "type", + "target": "terra:Block" + }, + { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "terra:Block" + }, + "values": { + "kind": "any", + "name": "Ignored singleton weight" + }, + "maxEntries": 1 + }, + { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "terra:Block" + }, + "values": { + "kind": "integer" + }, + "minEntries": 2 + }, + { + "kind": "list", + "element": { + "kind": "oneOf", + "options": [ + { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "terra:Block" + }, + "values": { + "kind": "any", + "name": "Ignored singleton weight" + }, + "maxEntries": 1 + }, + { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "terra:Block" + }, + "values": { + "kind": "integer" + }, + "minEntries": 2 + } + ] + }, + "maxItems": 1 + }, + { + "kind": "list", + "element": { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "terra:Block" + }, + "values": { + "kind": "integer" + } + }, + "minItems": 2 + } + ] + } + }, + "files": { + "FLORA": { + "kind": "object", + "fields": { + "type": { + "schema": { + "kind": "literal", + "value": "FLORA" + }, + "required": true + }, + "extends": { + "schema": { + "kind": "list", + "element": { + "kind": "string" + }, + "nullable": true + }, + "required": false, + "default": [], + "summary": "Parent configuration IDs; non-final fields may be inherited." + }, + "abstract": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": false, + "summary": "Abstract configurations supply inherited values and are not registered." + } + }, + "extends": [ + "Flora" + ] + } + } +} diff --git a/common/addons/config-locators/src/main/resources/META-INF/api/config.terradoc b/common/addons/config-locators/src/main/resources/META-INF/api/config.terradoc new file mode 100644 index 0000000000..9a0ce3690a --- /dev/null +++ b/common/addons/config-locators/src/main/resources/META-INF/api/config.terradoc @@ -0,0 +1,388 @@ +{ + "id": "config-locators", + "docVersion": 1, + "description": "Eleven registered vertical locator variants and eight inline block-pattern variants.", + "types": { + "terra:Locator": { + "kind": "union", + "discriminator": "type", + "values": { + "SURFACE": { + "kind": "object", + "fields": { + "range": { + "schema": { + "kind": "type", + "target": "terra:Range" + }, + "required": true + } + }, + "description": "Finds air above a non-air block within the search range. May return multiple surfaces." + }, + "TOP": { + "kind": "object", + "fields": { + "range": { + "schema": { + "kind": "type", + "target": "terra:Range" + }, + "required": true + } + }, + "description": "Finds air above a non-air block within the search range. Returns only the top result; its implementation starts at range.max inclusively." + }, + "RANDOM": { + "kind": "object", + "fields": { + "height": { + "schema": { + "kind": "type", + "target": "terra:Range" + }, + "required": true + }, + "amount": { + "schema": { + "kind": "type", + "target": "terra:Range" + }, + "required": true + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0 + } + }, + "description": "Chooses seeded heights using a uniform distribution." + }, + "GAUSSIAN_RANDOM": { + "kind": "object", + "fields": { + "height": { + "schema": { + "kind": "type", + "target": "terra:Range" + }, + "required": true + }, + "amount": { + "schema": { + "kind": "type", + "target": "terra:Range" + }, + "required": true + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0 + }, + "standard-deviation": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + } + }, + "description": "Chooses seeded heights using a Gaussian distribution." + }, + "PATTERN": { + "kind": "object", + "fields": { + "range": { + "schema": { + "kind": "type", + "target": "terra:Range" + }, + "required": true + }, + "pattern": { + "schema": { + "kind": "type", + "target": "Pattern" + }, + "required": true + } + } + }, + "ADJACENT_PATTERN": { + "kind": "object", + "fields": { + "range": { + "schema": { + "kind": "type", + "target": "terra:Range" + }, + "required": true + }, + "pattern": { + "schema": { + "kind": "type", + "target": "Pattern" + }, + "required": true + }, + "match-all": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": false, + "summary": "Require all four horizontal neighbors instead of at least one." + } + } + }, + "SAMPLER": { + "kind": "object", + "fields": { + "samplers": { + "schema": { + "kind": "list", + "element": { + "kind": "type", + "target": "terra:NoiseSampler" + } + }, + "required": true + } + }, + "description": "Each 2D sampler output is floored to a height; results outside the column are discarded." + }, + "SAMPLER_3D": { + "kind": "object", + "fields": { + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + } + }, + "description": "Accepts each height where the 3D sampler returns a value greater than zero." + }, + "AND": { + "kind": "object", + "fields": { + "locators": { + "schema": { + "kind": "list", + "element": { + "kind": "type", + "target": "terra:Locator" + }, + "minItems": 1 + }, + "required": true + } + }, + "description": "Combines a nonempty list of locator results using AND." + }, + "OR": { + "kind": "object", + "fields": { + "locators": { + "schema": { + "kind": "list", + "element": { + "kind": "type", + "target": "terra:Locator" + }, + "minItems": 1 + }, + "required": true + } + }, + "description": "Combines a nonempty list of locator results using OR." + }, + "XOR": { + "kind": "object", + "fields": { + "locators": { + "schema": { + "kind": "list", + "element": { + "kind": "type", + "target": "terra:Locator" + }, + "minItems": 1 + }, + "required": true + } + }, + "description": "Combines a nonempty list of locator results using XOR." + } + } + }, + "Pattern": { + "kind": "union", + "discriminator": "type", + "values": { + "MATCH_AIR": { + "kind": "object", + "fields": { + "offset": { + "schema": { + "kind": "type", + "target": "terra:Range" + }, + "required": true + } + }, + "description": "Checks air in the relative offset range." + }, + "MATCH_SOLID": { + "kind": "object", + "fields": { + "offset": { + "schema": { + "kind": "type", + "target": "terra:Range" + }, + "required": true + } + }, + "description": "Checks solid blocks in the relative offset range." + }, + "MATCH": { + "kind": "object", + "fields": { + "block": { + "schema": { + "kind": "type", + "target": "terra:Block" + }, + "required": true + }, + "offset": { + "schema": { + "kind": "type", + "target": "terra:Range" + }, + "required": true + } + } + }, + "MATCH_SET": { + "kind": "object", + "fields": { + "blocks": { + "schema": { + "kind": "type", + "target": "terra:MaterialSet" + }, + "required": true + }, + "offset": { + "schema": { + "kind": "type", + "target": "terra:Range" + }, + "required": true + } + } + }, + "AND": { + "kind": "object", + "fields": { + "patterns": { + "schema": { + "kind": "list", + "element": { + "kind": "type", + "target": "Pattern" + }, + "minItems": 1 + }, + "required": true + } + }, + "description": "Combines a nonempty list of patterns using AND." + }, + "OR": { + "kind": "object", + "fields": { + "patterns": { + "schema": { + "kind": "list", + "element": { + "kind": "type", + "target": "Pattern" + }, + "minItems": 1 + }, + "required": true + } + }, + "description": "Combines a nonempty list of patterns using OR." + }, + "XOR": { + "kind": "object", + "fields": { + "patterns": { + "schema": { + "kind": "list", + "element": { + "kind": "type", + "target": "Pattern" + }, + "minItems": 1 + }, + "required": true + } + }, + "description": "Combines a nonempty list of patterns using XOR." + }, + "NOT": { + "kind": "object", + "fields": { + "pattern": { + "schema": { + "kind": "type", + "target": "Pattern" + }, + "required": true + } + } + } + } + } + } +} diff --git a/common/addons/config-noise-function/src/main/resources/META-INF/api/config.terradoc b/common/addons/config-noise-function/src/main/resources/META-INF/api/config.terradoc new file mode 100644 index 0000000000..529e98041a --- /dev/null +++ b/common/addons/config-noise-function/src/main/resources/META-INF/api/config.terradoc @@ -0,0 +1,6039 @@ +{ + "id": "config-noise-function", + "docVersion": 1, + "description": "Inline noise samplers and pack-level named samplers and expression functions.", + "types": { + "terra:NoiseSampler": { + "kind": "union", + "values": { + "LINEAR": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true, + "summary": "Sampler whose output is transformed." + }, + "min": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + }, + "max": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + } + }, + "description": "Transforms or clamps sampler output using min and max." + }, + "LINEAR_MAP": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true, + "summary": "Sampler whose output is transformed." + }, + "from": { + "schema": { + "kind": "object", + "fields": { + "a": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": -1 + }, + "b": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 1 + } + }, + "nullable": true + }, + "required": false + }, + "to": { + "schema": { + "kind": "object", + "fields": { + "a": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + }, + "b": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + } + } + }, + "required": true + } + }, + "description": "Maps values from the source interval to the destination interval." + }, + "NORMAL": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true, + "summary": "Sampler whose output is transformed." + }, + "mean": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + }, + "standard-deviation": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + }, + "groups": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 16384 + } + }, + "description": "Normalizes sampler output using the specified distribution." + }, + "CLAMP": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true, + "summary": "Sampler whose output is transformed." + }, + "min": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + }, + "max": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + } + }, + "description": "Transforms or clamps sampler output using min and max." + }, + "PROBABILITY": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true, + "summary": "Sampler whose output is transformed." + } + }, + "description": "Converts sampler output to probability values." + }, + "SCALE": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true, + "summary": "Sampler whose output is transformed." + }, + "amplitude": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + } + }, + "description": "Multiplies sampler output by an amplitude." + }, + "POSTERIZATION": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true, + "summary": "Sampler whose output is transformed." + }, + "steps": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + } + }, + "description": "Quantizes sampler output into steps." + }, + "CUBIC_SPLINE": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true, + "summary": "Sampler whose output is transformed." + }, + "points": { + "schema": { + "kind": "list", + "element": { + "kind": "type", + "target": "CubicSplinePoint" + } + }, + "required": true + } + }, + "description": "Maps sampler output through cubic spline control points." + }, + "DOMAIN_WARP": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + }, + "warp": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + }, + "amplitude": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 1 + } + }, + "description": "Warps sample coordinates using another sampler." + }, + "FBM": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + }, + "octaves": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 3 + }, + "gain": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.5 + }, + "lacunarity": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2 + }, + "weighted-strength": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0 + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + } + }, + "description": "Fractal Brownian motion." + }, + "PING_PONG": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + }, + "octaves": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 3 + }, + "gain": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.5 + }, + "lacunarity": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2 + }, + "weighted-strength": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0 + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + }, + "ping-pong": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2 + } + }, + "description": "Ping-pong fractal noise." + }, + "RIDGED": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + }, + "octaves": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 3 + }, + "gain": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.5 + }, + "lacunarity": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2 + }, + "weighted-strength": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0 + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + } + }, + "description": "Ridged fractal noise." + }, + "OPEN_SIMPLEX_2": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + } + }, + "description": "OpenSimplex2 noise." + }, + "OPEN_SIMPLEX_2S": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + } + }, + "description": "OpenSimplex2S noise." + }, + "PERLIN": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + } + }, + "description": "Perlin noise." + }, + "SIMPLEX": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + } + }, + "description": "Simplex noise." + }, + "GABOR": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + }, + "rotation": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.25 + }, + "isotropic": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": true + }, + "deviation": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 1 + }, + "impulses": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 64 + }, + "frequency_0": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.625 + }, + "a": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.1 + } + }, + "description": "Gabor noise." + }, + "PSEUDOEROSION": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 1 + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + }, + "octaves": { + "schema": { + "kind": "integer", + "nullable": true + }, + "required": false, + "default": 4 + }, + "lacunarity": { + "schema": { + "kind": "float", + "nullable": true + }, + "required": false, + "default": 2 + }, + "gain": { + "schema": { + "kind": "float", + "nullable": true + }, + "required": false, + "default": 0.5 + }, + "slope-strength": { + "schema": { + "kind": "float", + "nullable": true + }, + "required": false, + "default": 1 + }, + "branch-strength": { + "schema": { + "kind": "float", + "nullable": true + }, + "required": false, + "default": 1 + }, + "strength": { + "schema": { + "kind": "float", + "nullable": true + }, + "required": false, + "default": 0.04 + }, + "erosion-frequency": { + "schema": { + "kind": "float", + "nullable": true + }, + "required": false, + "default": 0.02 + }, + "jitter": { + "schema": { + "kind": "float", + "nullable": true + }, + "required": false, + "default": 1 + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler", + "nullable": true + }, + "required": false, + "summary": "Must support derivatives. Defaults to internal OpenSimplex2 with frequency 0.02 and salt 0." + }, + "slope-mask": { + "schema": { + "kind": "object", + "fields": { + "enable": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": true + }, + "none": { + "schema": { + "kind": "float", + "nullable": true + }, + "required": false, + "default": -0.5 + }, + "full": { + "schema": { + "kind": "float", + "nullable": true + }, + "required": false, + "default": 1 + } + }, + "nullable": true + }, + "required": false + }, + "average-impulses": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": true + } + }, + "description": "Pseudo erosion based on a differentiable height sampler. Derivative support is checked at runtime." + }, + "VALUE": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + } + }, + "description": "Value noise." + }, + "VALUE_CUBIC": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + } + }, + "description": "Cubic value noise." + }, + "CELLULAR": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + }, + "distance": { + "schema": { + "kind": "type", + "target": "DistanceFunction", + "nullable": true + }, + "required": false, + "default": "EuclideanSq" + }, + "return": { + "schema": { + "kind": "enum", + "values": [ + "CellValue", + "Distance", + "Distance2", + "Distance2Add", + "Distance2Sub", + "Distance2Mul", + "Distance2Div", + "NoiseLookup", + "LocalNoiseLookup", + "Distance3", + "Distance3Add", + "Distance3Sub", + "Distance3Mul", + "Distance3Div", + "Angle" + ], + "nullable": true + }, + "required": false, + "default": "Distance" + }, + "jitter": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 1 + }, + "lookup": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler", + "nullable": true + }, + "required": false, + "summary": "Defaults to an internal OpenSimplex2 sampler with frequency 0.02 and salt 0." + }, + "salt-lookup": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": true + } + }, + "description": "Cellular noise with selectable distance and return modes." + }, + "WHITE_NOISE": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + } + }, + "description": "White noise." + }, + "POSITIVE_WHITE_NOISE": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + } + }, + "description": "Positive white noise." + }, + "GAUSSIAN": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + } + }, + "description": "Gaussian noise." + }, + "DISTANCE": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + }, + "distance-function": { + "schema": { + "kind": "type", + "target": "DistanceFunction", + "nullable": true + }, + "required": false, + "default": "Euclidean" + }, + "point": { + "schema": { + "kind": "object", + "fields": { + "x": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0 + }, + "y": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0 + }, + "z": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0 + } + }, + "nullable": true + }, + "required": false + }, + "normalize": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": false + }, + "radius": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 100 + } + }, + "description": "Distance from a configured point. The inherited frequency field is loaded but not passed to DistanceSampler." + }, + "CONSTANT": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "value": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0 + } + }, + "description": "Returns a constant value." + }, + "KERNEL": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "kernel": { + "schema": { + "kind": "list", + "element": { + "kind": "list", + "element": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "minItems": 1 + }, + "minItems": 1 + }, + "required": true, + "summary": "Nonempty rectangular matrix; all rows must have the same length." + }, + "factor": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 1 + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 1 + } + }, + "description": "Applies a rectangular sampling kernel." + }, + "LINEAR_HEIGHTMAP": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler", + "nullable": true + }, + "required": false, + "summary": "Defaults to an internal sampler returning zero." + }, + "base": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + }, + "scale": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 1 + } + }, + "description": "Produces a linear heightmap using a base height and scaled sampler." + }, + "TRANSLATE": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + }, + "x": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0 + }, + "y": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0 + }, + "z": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0 + } + }, + "description": "Translates sample coordinates." + }, + "ADD": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "left": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + }, + "right": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + } + }, + "description": "Adds the left and right sampler outputs." + }, + "SUB": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "left": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + }, + "right": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + } + }, + "description": "Subtracts the left and right sampler outputs." + }, + "MUL": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "left": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + }, + "right": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + } + }, + "description": "Multiplies the left and right sampler outputs." + }, + "DIV": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "left": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + }, + "right": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + } + }, + "description": "Divides the left and right sampler outputs." + }, + "MAX": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "left": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + }, + "right": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + } + }, + "description": "Takes the maximum of the left and right sampler outputs." + }, + "MIN": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "left": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + }, + "right": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + } + }, + "description": "Takes the minimum of the left and right sampler outputs." + }, + "CACHE": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler", + "nullable": true + }, + "required": false, + "summary": "No fallback sampler is supplied. Omitting it leaves null and sampling will fail.", + "default": null + } + }, + "description": "Experimental sampler cache. Match sampling dimensionality to dimensions." + }, + "EXPRESSION": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "expression": { + "schema": { + "kind": "type", + "target": "terra:Expression" + }, + "required": true + }, + "variables": { + "schema": { + "kind": "keyMap", + "keys": { + "kind": "string" + }, + "values": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "nullable": true + }, + "required": false, + "default": {} + }, + "samplers": { + "schema": { + "kind": "keyMap", + "keys": { + "kind": "string" + }, + "values": { + "kind": "type", + "target": "DimensionedSampler" + }, + "nullable": true + }, + "required": false, + "default": {}, + "summary": "Local named samplers override pack samplers with the same name." + }, + "functions": { + "schema": { + "kind": "keyMap", + "keys": { + "kind": "string" + }, + "values": { + "kind": "type", + "target": "Function" + }, + "nullable": true + }, + "required": false, + "default": {}, + "summary": "Local functions override pack functions with the same name." + } + }, + "description": "Paralithic coordinate expression with local variables, samplers and functions." + }, + "EXPRESSION_NORMALIZER": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true, + "summary": "Sampler whose output is transformed." + }, + "expression": { + "schema": { + "kind": "type", + "target": "terra:Expression" + }, + "required": true + }, + "variables": { + "schema": { + "kind": "keyMap", + "keys": { + "kind": "string" + }, + "values": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "nullable": true + }, + "required": false, + "default": {} + }, + "samplers": { + "schema": { + "kind": "keyMap", + "keys": { + "kind": "string" + }, + "values": { + "kind": "type", + "target": "DimensionedSampler" + }, + "nullable": true + }, + "required": false, + "default": {}, + "summary": "Local named samplers override pack samplers with the same name." + }, + "functions": { + "schema": { + "kind": "keyMap", + "keys": { + "kind": "string" + }, + "values": { + "kind": "type", + "target": "Function" + }, + "nullable": true + }, + "required": false, + "default": {}, + "summary": "Local functions override pack functions with the same name." + } + }, + "description": "Paralithic expression transforming sampler output." + } + } + }, + "DimensionedSampler": { + "kind": "union", + "discriminator": "type", + "description": "A named sampler used as an expression function. dimensions is mandatory because DimensionApplicableSampler reads it without a default.", + "values": { + "LINEAR": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true, + "summary": "Sampler whose output is transformed." + }, + "min": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + }, + "max": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + } + }, + "description": "Transforms or clamps sampler output using min and max." + }, + "LINEAR_MAP": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true, + "summary": "Sampler whose output is transformed." + }, + "from": { + "schema": { + "kind": "object", + "fields": { + "a": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": -1 + }, + "b": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 1 + } + }, + "nullable": true + }, + "required": false + }, + "to": { + "schema": { + "kind": "object", + "fields": { + "a": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + }, + "b": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + } + } + }, + "required": true + } + }, + "description": "Maps values from the source interval to the destination interval." + }, + "NORMAL": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true, + "summary": "Sampler whose output is transformed." + }, + "mean": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + }, + "standard-deviation": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + }, + "groups": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 16384 + } + }, + "description": "Normalizes sampler output using the specified distribution." + }, + "CLAMP": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true, + "summary": "Sampler whose output is transformed." + }, + "min": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + }, + "max": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + } + }, + "description": "Transforms or clamps sampler output using min and max." + }, + "PROBABILITY": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true, + "summary": "Sampler whose output is transformed." + } + }, + "description": "Converts sampler output to probability values." + }, + "SCALE": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true, + "summary": "Sampler whose output is transformed." + }, + "amplitude": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + } + }, + "description": "Multiplies sampler output by an amplitude." + }, + "POSTERIZATION": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true, + "summary": "Sampler whose output is transformed." + }, + "steps": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + } + }, + "description": "Quantizes sampler output into steps." + }, + "CUBIC_SPLINE": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true, + "summary": "Sampler whose output is transformed." + }, + "points": { + "schema": { + "kind": "list", + "element": { + "kind": "type", + "target": "CubicSplinePoint" + } + }, + "required": true + } + }, + "description": "Maps sampler output through cubic spline control points." + }, + "DOMAIN_WARP": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + }, + "warp": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + }, + "amplitude": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 1 + } + }, + "description": "Warps sample coordinates using another sampler." + }, + "FBM": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + }, + "octaves": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 3 + }, + "gain": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.5 + }, + "lacunarity": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2 + }, + "weighted-strength": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0 + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + } + }, + "description": "Fractal Brownian motion." + }, + "PING_PONG": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + }, + "octaves": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 3 + }, + "gain": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.5 + }, + "lacunarity": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2 + }, + "weighted-strength": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0 + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + }, + "ping-pong": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2 + } + }, + "description": "Ping-pong fractal noise." + }, + "RIDGED": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + }, + "octaves": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 3 + }, + "gain": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.5 + }, + "lacunarity": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 2 + }, + "weighted-strength": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0 + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + } + }, + "description": "Ridged fractal noise." + }, + "OPEN_SIMPLEX_2": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + } + }, + "description": "OpenSimplex2 noise." + }, + "OPEN_SIMPLEX_2S": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + } + }, + "description": "OpenSimplex2S noise." + }, + "PERLIN": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + } + }, + "description": "Perlin noise." + }, + "SIMPLEX": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + } + }, + "description": "Simplex noise." + }, + "GABOR": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + }, + "rotation": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.25 + }, + "isotropic": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": true + }, + "deviation": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 1 + }, + "impulses": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 64 + }, + "frequency_0": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.625 + }, + "a": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.1 + } + }, + "description": "Gabor noise." + }, + "PSEUDOEROSION": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 1 + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + }, + "octaves": { + "schema": { + "kind": "integer", + "nullable": true + }, + "required": false, + "default": 4 + }, + "lacunarity": { + "schema": { + "kind": "float", + "nullable": true + }, + "required": false, + "default": 2 + }, + "gain": { + "schema": { + "kind": "float", + "nullable": true + }, + "required": false, + "default": 0.5 + }, + "slope-strength": { + "schema": { + "kind": "float", + "nullable": true + }, + "required": false, + "default": 1 + }, + "branch-strength": { + "schema": { + "kind": "float", + "nullable": true + }, + "required": false, + "default": 1 + }, + "strength": { + "schema": { + "kind": "float", + "nullable": true + }, + "required": false, + "default": 0.04 + }, + "erosion-frequency": { + "schema": { + "kind": "float", + "nullable": true + }, + "required": false, + "default": 0.02 + }, + "jitter": { + "schema": { + "kind": "float", + "nullable": true + }, + "required": false, + "default": 1 + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler", + "nullable": true + }, + "required": false, + "summary": "Must support derivatives. Defaults to internal OpenSimplex2 with frequency 0.02 and salt 0." + }, + "slope-mask": { + "schema": { + "kind": "object", + "fields": { + "enable": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": true + }, + "none": { + "schema": { + "kind": "float", + "nullable": true + }, + "required": false, + "default": -0.5 + }, + "full": { + "schema": { + "kind": "float", + "nullable": true + }, + "required": false, + "default": 1 + } + }, + "nullable": true + }, + "required": false + }, + "average-impulses": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": true + } + }, + "description": "Pseudo erosion based on a differentiable height sampler. Derivative support is checked at runtime." + }, + "VALUE": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + } + }, + "description": "Value noise." + }, + "VALUE_CUBIC": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + } + }, + "description": "Cubic value noise." + }, + "CELLULAR": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + }, + "distance": { + "schema": { + "kind": "type", + "target": "DistanceFunction", + "nullable": true + }, + "required": false, + "default": "EuclideanSq" + }, + "return": { + "schema": { + "kind": "enum", + "values": [ + "CellValue", + "Distance", + "Distance2", + "Distance2Add", + "Distance2Sub", + "Distance2Mul", + "Distance2Div", + "NoiseLookup", + "LocalNoiseLookup", + "Distance3", + "Distance3Add", + "Distance3Sub", + "Distance3Mul", + "Distance3Div", + "Angle" + ], + "nullable": true + }, + "required": false, + "default": "Distance" + }, + "jitter": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 1 + }, + "lookup": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler", + "nullable": true + }, + "required": false, + "summary": "Defaults to an internal OpenSimplex2 sampler with frequency 0.02 and salt 0." + }, + "salt-lookup": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": true + } + }, + "description": "Cellular noise with selectable distance and return modes." + }, + "WHITE_NOISE": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + } + }, + "description": "White noise." + }, + "POSITIVE_WHITE_NOISE": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + } + }, + "description": "Positive white noise." + }, + "GAUSSIAN": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + } + }, + "description": "Gaussian noise." + }, + "DISTANCE": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0.02, + "summary": "Coordinate frequency before sampling." + }, + "salt": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Salt added to the seed." + }, + "distance-function": { + "schema": { + "kind": "type", + "target": "DistanceFunction", + "nullable": true + }, + "required": false, + "default": "Euclidean" + }, + "point": { + "schema": { + "kind": "object", + "fields": { + "x": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0 + }, + "y": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0 + }, + "z": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0 + } + }, + "nullable": true + }, + "required": false + }, + "normalize": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": false + }, + "radius": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 100 + } + }, + "description": "Distance from a configured point. The inherited frequency field is loaded but not passed to DistanceSampler." + }, + "CONSTANT": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "value": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0 + } + }, + "description": "Returns a constant value." + }, + "KERNEL": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "kernel": { + "schema": { + "kind": "list", + "element": { + "kind": "list", + "element": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "minItems": 1 + }, + "minItems": 1 + }, + "required": true, + "summary": "Nonempty rectangular matrix; all rows must have the same length." + }, + "factor": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 1 + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + }, + "frequency": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 1 + } + }, + "description": "Applies a rectangular sampling kernel." + }, + "LINEAR_HEIGHTMAP": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler", + "nullable": true + }, + "required": false, + "summary": "Defaults to an internal sampler returning zero." + }, + "base": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + }, + "scale": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 1 + } + }, + "description": "Produces a linear heightmap using a base height and scaled sampler." + }, + "TRANSLATE": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + }, + "x": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0 + }, + "y": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0 + }, + "z": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 0 + } + }, + "description": "Translates sample coordinates." + }, + "ADD": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "left": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + }, + "right": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + } + }, + "description": "Adds the left and right sampler outputs." + }, + "SUB": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "left": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + }, + "right": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + } + }, + "description": "Subtracts the left and right sampler outputs." + }, + "MUL": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "left": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + }, + "right": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + } + }, + "description": "Multiplies the left and right sampler outputs." + }, + "DIV": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "left": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + }, + "right": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + } + }, + "description": "Divides the left and right sampler outputs." + }, + "MAX": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "left": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + }, + "right": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + } + }, + "description": "Takes the maximum of the left and right sampler outputs." + }, + "MIN": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "left": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + }, + "right": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true + } + }, + "description": "Takes the minimum of the left and right sampler outputs." + }, + "CACHE": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler", + "nullable": true + }, + "required": false, + "summary": "No fallback sampler is supplied. Omitting it leaves null and sampling will fail.", + "default": null + } + }, + "description": "Experimental sampler cache. Match sampling dimensionality to dimensions." + }, + "EXPRESSION": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "expression": { + "schema": { + "kind": "type", + "target": "terra:Expression" + }, + "required": true + }, + "variables": { + "schema": { + "kind": "keyMap", + "keys": { + "kind": "string" + }, + "values": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "nullable": true + }, + "required": false, + "default": {} + }, + "samplers": { + "schema": { + "kind": "keyMap", + "keys": { + "kind": "string" + }, + "values": { + "kind": "type", + "target": "DimensionedSampler" + }, + "nullable": true + }, + "required": false, + "default": {}, + "summary": "Local named samplers override pack samplers with the same name." + }, + "functions": { + "schema": { + "kind": "keyMap", + "keys": { + "kind": "string" + }, + "values": { + "kind": "type", + "target": "Function" + }, + "nullable": true + }, + "required": false, + "default": {}, + "summary": "Local functions override pack functions with the same name." + } + }, + "description": "Paralithic coordinate expression with local variables, samplers and functions." + }, + "EXPRESSION_NORMALIZER": { + "kind": "object", + "fields": { + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "enum", + "values": [ + 2, + 3 + ] + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of dimensions; runtime accepts only 2 or 3." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler" + }, + "required": true, + "summary": "Sampler whose output is transformed." + }, + "expression": { + "schema": { + "kind": "type", + "target": "terra:Expression" + }, + "required": true + }, + "variables": { + "schema": { + "kind": "keyMap", + "keys": { + "kind": "string" + }, + "values": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "nullable": true + }, + "required": false, + "default": {} + }, + "samplers": { + "schema": { + "kind": "keyMap", + "keys": { + "kind": "string" + }, + "values": { + "kind": "type", + "target": "DimensionedSampler" + }, + "nullable": true + }, + "required": false, + "default": {}, + "summary": "Local named samplers override pack samplers with the same name." + }, + "functions": { + "schema": { + "kind": "keyMap", + "keys": { + "kind": "string" + }, + "values": { + "kind": "type", + "target": "Function" + }, + "nullable": true + }, + "required": false, + "default": {}, + "summary": "Local functions override pack functions with the same name." + } + }, + "description": "Paralithic expression transforming sampler output." + } + } + }, + "DistanceFunction": { + "kind": "enum", + "values": [ + "Euclidean", + "EuclideanSq", + "Manhattan", + "Hybrid" + ] + }, + "CubicSplinePoint": { + "kind": "object", + "fields": { + "from": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + }, + "to": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + }, + "gradient": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true + } + } + }, + "Function": { + "kind": "object", + "fields": { + "arguments": { + "schema": { + "kind": "list", + "element": { + "kind": "string" + } + }, + "required": true, + "summary": "Ordered argument names for this function." + }, + "expression": { + "schema": { + "kind": "type", + "target": "terra:Expression" + }, + "required": true + }, + "functions": { + "schema": { + "kind": "keyMap", + "keys": { + "kind": "string" + }, + "values": { + "kind": "type", + "target": "Function" + }, + "nullable": true + }, + "required": false, + "default": {}, + "summary": "Nested function definitions." + } + } + } + }, + "files": { + "pack.yml": { + "kind": "object", + "fields": { + "samplers": { + "schema": { + "kind": "keyMap", + "keys": { + "kind": "string" + }, + "values": { + "kind": "type", + "target": "DimensionedSampler" + }, + "nullable": true + }, + "required": false, + "default": {}, + "summary": "Named samplers callable from expressions; each requires dimensions." + }, + "functions": { + "schema": { + "kind": "keyMap", + "keys": { + "kind": "string" + }, + "values": { + "kind": "type", + "target": "Function" + }, + "nullable": true + }, + "required": false, + "default": {}, + "summary": "Pack-wide expression functions." + } + } + } + } +} diff --git a/common/addons/config-number-predicate/src/main/resources/META-INF/api/config.terradoc b/common/addons/config-number-predicate/src/main/resources/META-INF/api/config.terradoc new file mode 100644 index 0000000000..ef1f15937c --- /dev/null +++ b/common/addons/config-number-predicate/src/main/resources/META-INF/api/config.terradoc @@ -0,0 +1,16 @@ +{ + "id": "config-number-predicate", + "docVersion": 1, + "description": "Loads numeric predicates from Paralithic expression strings.", + "types": { + "NumberPredicate": { + "kind": "expr", + "name": "Paralithic", + "description": "String expression with invocation variable value. Evaluation is true when the numeric result is nonzero. YAML booleans and numeric values are rejected. Uses pack expression parse options, but this loader does not inject pack variables or noise functions.", + "examples": [ + "value > 3", + "value >= 0 && value < 1" + ] + } + } +} diff --git a/common/addons/config-ore/src/main/resources/META-INF/api/config.terradoc b/common/addons/config-ore/src/main/resources/META-INF/api/config.terradoc new file mode 100644 index 0000000000..5ec19e503d --- /dev/null +++ b/common/addons/config-ore/src/main/resources/META-INF/api/config.terradoc @@ -0,0 +1,253 @@ +{ + "id": "config-ore", + "docVersion": 1, + "description": "ORE and SCATTERED_ORE configurations register raw structures. Scattered size remains required despite its field initializer.", + "types": { + "Ore": { + "kind": "object", + "fields": { + "id": { + "schema": { + "kind": "string", + "pattern": "^[a-zA-Z0-9_-]*$" + }, + "required": true, + "summary": "Registry identifier; final and not inherited." + }, + "material": { + "schema": { + "kind": "type", + "target": "terra:Block" + }, + "required": true + }, + "material-overrides": { + "schema": { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "terra:Block" + }, + "values": { + "kind": "type", + "target": "terra:Block" + }, + "nullable": true + }, + "required": false, + "default": {}, + "summary": "Override material by replaced block type. Key state properties are reduced to the block type." + }, + "replace": { + "schema": { + "kind": "type", + "target": "terra:MaterialSet" + }, + "required": true + }, + "physics": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": false + }, + "size": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Ore vein size." + }, + "exposed": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 1, + "summary": "Chance of accepting ore bordering air: 0 rejects, 1 accepts. Source does not enforce a 0\u20131 bound." + } + } + }, + "ScatteredOre": { + "kind": "object", + "fields": { + "id": { + "schema": { + "kind": "string", + "pattern": "^[a-zA-Z0-9_-]*$" + }, + "required": true, + "summary": "Registry identifier; final and not inherited." + }, + "material": { + "schema": { + "kind": "type", + "target": "terra:Block" + }, + "required": true + }, + "material-overrides": { + "schema": { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "terra:Block" + }, + "values": { + "kind": "type", + "target": "terra:Block" + }, + "nullable": true + }, + "required": false, + "default": {}, + "summary": "Override material by replaced block type. Key state properties are reduced to the block type." + }, + "replace": { + "schema": { + "kind": "type", + "target": "terra:MaterialSet" + }, + "required": true + }, + "physics": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": false + }, + "size": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Required size, loaded into both an integer spread and the inherited double vein size. The initializer 7 is not a default." + }, + "exposed": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "float" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ], + "nullable": true + }, + "required": false, + "default": 1, + "summary": "Chance of accepting ore bordering air: 0 rejects, 1 accepts. Source does not enforce a 0\u20131 bound." + } + } + } + }, + "files": { + "ORE": { + "kind": "object", + "fields": { + "type": { + "schema": { + "kind": "literal", + "value": "ORE" + }, + "required": true + }, + "extends": { + "schema": { + "kind": "list", + "element": { + "kind": "string" + }, + "nullable": true + }, + "required": false, + "default": [], + "summary": "Parent configuration IDs; non-final fields may be inherited." + }, + "abstract": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": false, + "summary": "Abstract configurations supply inherited values and are not registered." + } + }, + "extends": [ + "Ore" + ] + }, + "SCATTERED_ORE": { + "kind": "object", + "fields": { + "type": { + "schema": { + "kind": "literal", + "value": "SCATTERED_ORE" + }, + "required": true + }, + "extends": { + "schema": { + "kind": "list", + "element": { + "kind": "string" + }, + "nullable": true + }, + "required": false, + "default": [], + "summary": "Parent configuration IDs; non-final fields may be inherited." + }, + "abstract": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": false, + "summary": "Abstract configurations supply inherited values and are not registered." + } + }, + "extends": [ + "ScatteredOre" + ] + } + } +} diff --git a/common/addons/config-palette/src/main/resources/META-INF/api/config.terradoc b/common/addons/config-palette/src/main/resources/META-INF/api/config.terradoc new file mode 100644 index 0000000000..6a94d61e22 --- /dev/null +++ b/common/addons/config-palette/src/main/resources/META-INF/api/config.terradoc @@ -0,0 +1,204 @@ +{ + "id": "config-palette", + "docVersion": 1, + "description": "Registered palette configurations and their weighted block layers.", + "types": { + "terra:Palette": { + "kind": "object", + "fields": { + "id": { + "schema": { + "kind": "string", + "pattern": "^[a-zA-Z0-9_-]*$" + }, + "required": true, + "summary": "Registry identifier; must be present on this file even when inherited." + }, + "layers": { + "schema": { + "kind": "list", + "element": { + "kind": "type", + "target": "PaletteLayer" + } + }, + "required": true, + "summary": "Layers in order from the surface inward." + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler", + "nullable": true + }, + "required": false, + "summary": "Defaults to an internal sampler returning zero." + } + } + }, + "terra:PaletteReference": { + "kind": "oneOf", + "options": [ + { + "kind": "ref", + "target": "terra:Palette" + } + ] + }, + "PaletteLayer": { + "kind": "object", + "fields": { + "materials": { + "schema": { + "kind": "type", + "target": "WeightedBlocks" + }, + "required": true + }, + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler", + "nullable": true + }, + "required": false, + "summary": "When absent or YAML null, use the palette-level sampler.", + "default": null + }, + "layers": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Number of depth layers using these materials; the runtime does not enforce a positive minimum." + } + } + }, + "WeightedBlocks": { + "kind": "oneOf", + "description": "A block, a block-to-weight map, or a list of such maps. A singleton entry ignores its weight.", + "options": [ + { + "kind": "type", + "target": "terra:Block" + }, + { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "terra:Block" + }, + "values": { + "kind": "any", + "name": "Ignored singleton weight" + }, + "maxEntries": 1 + }, + { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "terra:Block" + }, + "values": { + "kind": "integer" + }, + "minEntries": 2 + }, + { + "kind": "list", + "element": { + "kind": "oneOf", + "options": [ + { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "terra:Block" + }, + "values": { + "kind": "any", + "name": "Ignored singleton weight" + }, + "maxEntries": 1 + }, + { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "terra:Block" + }, + "values": { + "kind": "integer" + }, + "minEntries": 2 + } + ] + }, + "maxItems": 1 + }, + { + "kind": "list", + "element": { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "terra:Block" + }, + "values": { + "kind": "integer" + } + }, + "minItems": 2 + } + ] + } + }, + "files": { + "PALETTE": { + "kind": "object", + "fields": { + "type": { + "schema": { + "kind": "literal", + "value": "PALETTE" + }, + "required": true + }, + "extends": { + "schema": { + "kind": "list", + "element": { + "kind": "string" + }, + "nullable": true + }, + "required": false, + "default": [], + "summary": "Parent configuration identifiers; non-final fields can be inherited." + }, + "abstract": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": false, + "summary": "Abstract configurations are available for inheritance and are not registered." + } + }, + "extends": [ + "terra:Palette" + ] + } + } +} diff --git a/common/addons/generation-stage-feature/src/main/resources/META-INF/api/config.terradoc b/common/addons/generation-stage-feature/src/main/resources/META-INF/api/config.terradoc new file mode 100644 index 0000000000..c7d6b3618c --- /dev/null +++ b/common/addons/generation-stage-feature/src/main/resources/META-INF/api/config.terradoc @@ -0,0 +1,99 @@ +{ + "id": "generation-stage-feature", + "docVersion": 1, + "description": "FEATURE generation stages and the per-stage feature lists contributed to biome configurations.", + "types": { + "terra:GenerationStage": { + "kind": "union", + "values": { + "FEATURE": { + "kind": "object", + "fields": { + "id": { + "schema": { + "kind": "string" + }, + "required": true, + "summary": "Stage identifier used to load biome features. lists. IDs containing dots are interpreted as nested YAML paths by the runtime." + }, + "resolution": { + "schema": { + "kind": "enum", + "values": [ + 1, + 2, + 4, + 8, + 16 + ], + "nullable": true + }, + "required": false, + "default": 4, + "summary": "Biome column sample resolution; must be one of these powers of two." + }, + "blend": { + "schema": { + "kind": "object", + "fields": { + "sampler": { + "schema": { + "kind": "type", + "target": "terra:NoiseSampler", + "nullable": true + }, + "required": false, + "summary": "Coordinate-warping sampler; defaults to an internal zero sampler." + }, + "amplitude": { + "schema": { + "kind": "float", + "nullable": true + }, + "required": false, + "default": 0 + } + }, + "nullable": true + }, + "required": false + } + }, + "description": "Runs feature placement using biome lists indexed by this stage ID." + } + } + }, + "terra:Biome": { + "kind": "object", + "fields": { + "features": { + "schema": { + "kind": "keyMap", + "keys": { + "kind": "string" + }, + "values": { + "kind": "list", + "element": { + "kind": "ref", + "target": "terra:Feature" + } + }, + "nullable": true + }, + "required": false, + "summary": "Maps configured FEATURE stage IDs to ordered feature identifiers. Missing lists default to empty. Only IDs present in pack stages are loaded; v1 cannot derive or restrict these keys. Dotted stage IDs require nested maps and are not fully represented by this keyMap." + } + } + } + }, + "files": { + "BIOME": { + "kind": "object", + "fields": {}, + "extends": [ + "terra:Biome" + ] + } + } +} diff --git a/common/addons/library-image/src/main/resources/META-INF/api/config.terradoc b/common/addons/library-image/src/main/resources/META-INF/api/config.terradoc new file mode 100644 index 0000000000..6c5e524e11 --- /dev/null +++ b/common/addons/library-image/src/main/resources/META-INF/api/config.terradoc @@ -0,0 +1,520 @@ +{ + "id": "library-image", + "docVersion": 1, + "description": "Inline bitmap images, color samplers, two numeric image sampler variants and pack image-cache options.", + "types": { + "Image": { + "kind": "union", + "discriminator": "type", + "values": { + "BITMAP": { + "kind": "object", + "fields": { + "path": { + "schema": { + "kind": "string" + }, + "required": true, + "summary": "Path resolved against the pack root and read by ImageIO." + } + } + }, + "STITCHED_BITMAP": { + "kind": "object", + "fields": { + "path-format": { + "schema": { + "kind": "string", + "pattern": "^(?=[\\s\\S]*\\{row\\})(?=[\\s\\S]*\\{column\\})[\\s\\S]*$" + }, + "required": true, + "summary": "Must contain {row} and {column}; the first occurrence of each is substituted." + }, + "rows": { + "schema": { + "kind": "integer", + "minimum": 1 + }, + "required": true + }, + "columns": { + "schema": { + "kind": "integer", + "minimum": 1 + }, + "required": true + }, + "zero-indexed": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": false, + "summary": "Use tile indices starting at 0 rather than 1." + } + } + } + } + }, + "ColorSampler": { + "kind": "union", + "discriminator": "type", + "values": { + "COLOR": { + "kind": "object", + "fields": { + "color": { + "schema": { + "kind": "type", + "target": "Color" + }, + "required": true + } + } + }, + "SINGLE_IMAGE": { + "kind": "object", + "fields": { + "image": { + "schema": { + "kind": "type", + "target": "Image" + }, + "required": true + }, + "align": { + "schema": { + "kind": "enum", + "values": [ + "NONE", + "CENTER" + ], + "nullable": true + }, + "required": false, + "default": "NONE" + }, + "outside-sampler": { + "schema": { + "kind": "type", + "target": "ColorSampler" + }, + "required": true, + "summary": "Required fallback sampler for positions outside the image." + } + } + }, + "TILED_IMAGE": { + "kind": "object", + "fields": { + "image": { + "schema": { + "kind": "type", + "target": "Image" + }, + "required": true + }, + "align": { + "schema": { + "kind": "enum", + "values": [ + "NONE", + "CENTER" + ], + "nullable": true + }, + "required": false, + "default": "NONE" + } + } + }, + "ROTATE": { + "kind": "object", + "fields": { + "color-sampler": { + "schema": { + "kind": "type", + "target": "ColorSampler" + }, + "required": true + }, + "angle": { + "schema": { + "kind": "float" + }, + "required": true, + "summary": "Rotation angle in degrees." + } + } + }, + "TRANSLATE": { + "kind": "object", + "fields": { + "color-sampler": { + "schema": { + "kind": "type", + "target": "ColorSampler" + }, + "required": true + }, + "x": { + "schema": { + "kind": "integer" + }, + "required": true + }, + "z": { + "schema": { + "kind": "integer" + }, + "required": true + } + } + } + } + }, + "Color": { + "kind": "string", + "minLength": 1, + "description": "Quoted color string: RRGGBB or AARRGGBB hex, optionally prefixed with #; or comma-separated red,green,blue / alpha,red,green,blue channels. Numeric channels use Integer.decode (decimal, hexadecimal or octal) and must be 0\u2013255.", + "examples": [ + "#ff0000", + "80ff0000", + "255,0,0", + "128,255,0,0" + ] + }, + "terra:NoiseSampler": { + "kind": "union", + "discriminator": "type", + "values": { + "CHANNEL": { + "kind": "object", + "fields": { + "color-sampler": { + "schema": { + "kind": "type", + "target": "ColorSampler" + }, + "required": true + }, + "channel": { + "schema": { + "kind": "enum", + "values": [ + "RED", + "GREEN", + "BLUE", + "GRAYSCALE", + "ALPHA" + ] + }, + "required": true + }, + "normalize": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": true, + "summary": "Normalize output into [-1, 1] instead of channel values." + }, + "premultiply": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": false, + "summary": "Multiply RGB by alpha before reading the channel." + } + } + }, + "DISTANCE_TRANSFORM": { + "kind": "object", + "fields": { + "image": { + "schema": { + "kind": "type", + "target": "Image" + }, + "required": true + }, + "threshold": { + "schema": { + "kind": "integer", + "nullable": true + }, + "required": false, + "default": 127, + "summary": "Channel threshold used by binary cost functions." + }, + "clamp-to-max-edge": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": false + }, + "channel": { + "schema": { + "kind": "enum", + "values": [ + "RED", + "GREEN", + "BLUE", + "GRAYSCALE", + "ALPHA" + ], + "nullable": true + }, + "required": false, + "default": "GRAYSCALE" + }, + "cost-function": { + "schema": { + "kind": "enum", + "values": [ + "Channel", + "Threshold", + "ThresholdEdge", + "ThresholdEdgeSigned" + ], + "nullable": true + }, + "required": false, + "default": "Channel" + }, + "invert-threshold": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": false + }, + "normalization": { + "schema": { + "kind": "enum", + "values": [ + "None", + "Linear", + "SmoothPreserveZero" + ], + "nullable": true + }, + "required": false, + "default": "None" + } + } + } + } + }, + "config-noise-function:DimensionedSampler": { + "kind": "union", + "discriminator": "type", + "values": { + "CHANNEL": { + "kind": "object", + "fields": { + "color-sampler": { + "schema": { + "kind": "type", + "target": "ColorSampler" + }, + "required": true + }, + "channel": { + "schema": { + "kind": "enum", + "values": [ + "RED", + "GREEN", + "BLUE", + "GRAYSCALE", + "ALPHA" + ] + }, + "required": true + }, + "normalize": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": true, + "summary": "Normalize output into [-1, 1] instead of channel values." + }, + "premultiply": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": false, + "summary": "Multiply RGB by alpha before reading the channel." + }, + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Required by the expression sampler wrapper; 2 selects 2D, other integers select 3D." + } + } + }, + "DISTANCE_TRANSFORM": { + "kind": "object", + "fields": { + "image": { + "schema": { + "kind": "type", + "target": "Image" + }, + "required": true + }, + "threshold": { + "schema": { + "kind": "integer", + "nullable": true + }, + "required": false, + "default": 127, + "summary": "Channel threshold used by binary cost functions." + }, + "clamp-to-max-edge": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": false + }, + "channel": { + "schema": { + "kind": "enum", + "values": [ + "RED", + "GREEN", + "BLUE", + "GRAYSCALE", + "ALPHA" + ], + "nullable": true + }, + "required": false, + "default": "GRAYSCALE" + }, + "cost-function": { + "schema": { + "kind": "enum", + "values": [ + "Channel", + "Threshold", + "ThresholdEdge", + "ThresholdEdgeSigned" + ], + "nullable": true + }, + "required": false, + "default": "Channel" + }, + "invert-threshold": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": false + }, + "normalization": { + "schema": { + "kind": "enum", + "values": [ + "None", + "Linear", + "SmoothPreserveZero" + ], + "nullable": true + }, + "required": false, + "default": "None" + }, + "dimensions": { + "schema": { + "kind": "oneOf", + "options": [ + { + "kind": "integer" + }, + { + "kind": "type", + "target": "terra:Expression" + } + ] + }, + "required": true, + "summary": "Required by the expression sampler wrapper; 2 selects 2D, other integers select 3D." + } + } + } + } + } + }, + "files": { + "pack.yml": { + "kind": "object", + "fields": { + "images": { + "schema": { + "kind": "object", + "fields": { + "cache": { + "schema": { + "kind": "object", + "fields": { + "load-on-use": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": false, + "summary": "Load images when first used rather than during pack loading." + }, + "timeout": { + "schema": { + "kind": "integer", + "nullable": true + }, + "required": false, + "default": 0, + "summary": "Seconds after last use before unloading; values <= 0 keep images cached." + } + }, + "nullable": true + }, + "required": false + } + }, + "nullable": true + }, + "required": false + } + } + } + } +} diff --git a/common/addons/locator-slant-noise-3d/src/main/resources/META-INF/api/config.terradoc b/common/addons/locator-slant-noise-3d/src/main/resources/META-INF/api/config.terradoc new file mode 100644 index 0000000000..6135896282 --- /dev/null +++ b/common/addons/locator-slant-noise-3d/src/main/resources/META-INF/api/config.terradoc @@ -0,0 +1,26 @@ +{ + "id": "locator-slant-noise-3d", + "docVersion": 1, + "description": "SLANT locator tests the noise generator's slant value with a numeric predicate.", + "types": { + "terra:Locator": { + "kind": "union", + "discriminator": "type", + "values": { + "SLANT": { + "kind": "object", + "fields": { + "condition": { + "schema": { + "kind": "type", + "target": "config-number-predicate:NumberPredicate" + }, + "required": true + } + }, + "description": "Requires a numeric predicate loader and a world using NoiseChunkGenerator3D; sampling casts the world generator to that implementation." + } + } + } + } +} diff --git a/common/addons/palette-block-shortcut/src/main/resources/META-INF/api/config.terradoc b/common/addons/palette-block-shortcut/src/main/resources/META-INF/api/config.terradoc new file mode 100644 index 0000000000..ab82d036a6 --- /dev/null +++ b/common/addons/palette-block-shortcut/src/main/resources/META-INF/api/config.terradoc @@ -0,0 +1,29 @@ +{ + "id": "palette-block-shortcut", + "docVersion": 1, + "description": "BLOCK: creates a palette containing one block at every depth.", + "types": { + "PaletteBlockShortcut": { + "kind": "string", + "pattern": "^BLOCK:.+$", + "description": "BLOCK: followed by a platform block state; the prefix is case-sensitive.", + "examples": [ + "BLOCK:minecraft:stone", + "BLOCK:minecraft:oak_log[axis=y]" + ] + }, + "terra:PaletteReference": { + "kind": "oneOf", + "options": [ + { + "kind": "ref", + "target": "terra:Palette" + }, + { + "kind": "type", + "target": "PaletteBlockShortcut" + } + ] + } + } +} diff --git a/common/addons/pipeline-image/src/main/resources/META-INF/api/config.terradoc b/common/addons/pipeline-image/src/main/resources/META-INF/api/config.terradoc new file mode 100644 index 0000000000..a4e32d84af --- /dev/null +++ b/common/addons/pipeline-image/src/main/resources/META-INF/api/config.terradoc @@ -0,0 +1,110 @@ +{ + "id": "pipeline-image", + "docVersion": 1, + "description": "Image pipeline source with PipelineBiome outputs.", + "types": { + "biome-provider-pipeline:Source": { + "kind": "union", + "discriminator": "type", + "values": { + "IMAGE": { + "kind": "object", + "fields": { + "color-sampler": { + "schema": { + "kind": "type", + "target": "library-image:ColorSampler" + }, + "required": true + }, + "color-conversion": { + "schema": { + "kind": "type", + "target": "ColorConverter" + }, + "required": true + } + } + } + } + }, + "ColorConverter": { + "kind": "union", + "discriminator": "type", + "values": { + "EXACT": { + "kind": "object", + "fields": { + "match": { + "schema": { + "kind": "type", + "target": "ColorMapping" + }, + "required": true + }, + "else": { + "schema": { + "kind": "type", + "target": "biome-provider-pipeline:PipelineBiome" + }, + "required": true, + "summary": "Required fallback for colors with no exact mapping." + }, + "ignore-alpha": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": true + } + }, + "description": "Exact color matching with a fallback; alpha is ignored by default." + }, + "CLOSEST": { + "kind": "object", + "fields": { + "match": { + "schema": { + "kind": "type", + "target": "ColorMapping" + }, + "required": true + } + }, + "description": "Closest color using summed absolute RGB differences; alpha is ignored. An empty map cannot produce a biome." + } + } + }, + "ColorMapping": { + "kind": "union", + "discriminator": "type", + "values": { + "USE_BIOME_COLORS": { + "kind": "object", + "fields": {}, + "description": "Build the mapping from registered Terra biome color values." + }, + "MAP": { + "kind": "object", + "fields": { + "map": { + "schema": { + "kind": "keyMap", + "keys": { + "kind": "type", + "target": "library-image:Color" + }, + "values": { + "kind": "type", + "target": "biome-provider-pipeline:PipelineBiome" + } + }, + "required": true + } + } + } + } + } + } +} diff --git a/common/addons/structure-block-shortcut/src/main/resources/META-INF/api/config.terradoc b/common/addons/structure-block-shortcut/src/main/resources/META-INF/api/config.terradoc new file mode 100644 index 0000000000..9afcd9b7a7 --- /dev/null +++ b/common/addons/structure-block-shortcut/src/main/resources/META-INF/api/config.terradoc @@ -0,0 +1,29 @@ +{ + "id": "structure-block-shortcut", + "docVersion": 1, + "description": "BLOCK: creates a structure that places one block at its generation location.", + "types": { + "StructureBlockShortcut": { + "kind": "string", + "pattern": "^BLOCK:.+$", + "description": "Case-sensitive BLOCK: prefix followed by a platform block state. Rotation and random arguments do not change the placed block state.", + "examples": [ + "BLOCK:minecraft:stone", + "BLOCK:minecraft:oak_log[axis=y]" + ] + }, + "terra:StructureReference": { + "kind": "oneOf", + "options": [ + { + "kind": "ref", + "target": "terra:Structure" + }, + { + "kind": "type", + "target": "StructureBlockShortcut" + } + ] + } + } +} diff --git a/common/addons/structure-sponge-loader/src/main/resources/META-INF/api/config.terradoc b/common/addons/structure-sponge-loader/src/main/resources/META-INF/api/config.terradoc new file mode 100644 index 0000000000..8cfbb0f18e --- /dev/null +++ b/common/addons/structure-sponge-loader/src/main/resources/META-INF/api/config.terradoc @@ -0,0 +1,11 @@ +{ + "id": "structure-sponge-loader", + "docVersion": 1, + "description": "Recursively scans the pack root for case-sensitive .schem files during pack preload and registers raw Structure entries under structure-sponge-loader:. Directory names do not contribute to IDs, so equal basenames collide. Reads gzip or uncompressed NBT. The converter accepts Version 2 and 3 offset branches, but assumes root-level Palette and BlockData and reads one signed byte per block; this is not a claim of complete Sponge format compatibility. V2 uses a complete WEOffsetX/Y/Z metadata triplet or zero offset; V3 reads Offset. minecraft:structure_void states are skipped. V1 metadata cannot discover these IDs or validate binary schematic contents.", + "types": { + "terra:Structure": { + "kind": "string", + "description": "Recursively scans the pack root for case-sensitive .schem files during pack preload and registers raw Structure entries under structure-sponge-loader:. Directory names do not contribute to IDs, so equal basenames collide. Reads gzip or uncompressed NBT. The converter accepts Version 2 and 3 offset branches, but assumes root-level Palette and BlockData and reads one signed byte per block; this is not a claim of complete Sponge format compatibility. V2 uses a complete WEOffsetX/Y/Z metadata triplet or zero offset; V3 reads Offset. minecraft:structure_void states are skipped. V1 metadata cannot discover these IDs or validate binary schematic contents." + } + } +} diff --git a/common/addons/structure-terrascript-loader/src/main/resources/META-INF/api/config.terradoc b/common/addons/structure-terrascript-loader/src/main/resources/META-INF/api/config.terradoc new file mode 100644 index 0000000000..fde8606a0e --- /dev/null +++ b/common/addons/structure-terrascript-loader/src/main/resources/META-INF/api/config.terradoc @@ -0,0 +1,11 @@ +{ + "id": "structure-terrascript-loader", + "docVersion": 1, + "description": "Recursively scans the pack root for case-sensitive .tesf files during pack preload at priority 100 and registers raw Structure entries under structure-terrascript-loader:. Directory names do not contribute to IDs, so equal basenames collide. Files are parsed as TerraScript structures with access to pack Structure, LootTable and FunctionBuilder registries. Additional addons may supply script functions. V1 metadata cannot discover these IDs or describe TerraScript grammar and callable signatures.", + "types": { + "terra:Structure": { + "kind": "string", + "description": "Recursively scans the pack root for case-sensitive .tesf files during pack preload at priority 100 and registers raw Structure entries under structure-terrascript-loader:. Directory names do not contribute to IDs, so equal basenames collide. Files are parsed as TerraScript structures with access to pack Structure, LootTable and FunctionBuilder registries. Additional addons may supply script functions. V1 metadata cannot discover these IDs or describe TerraScript grammar and callable signatures." + } + } +} diff --git a/common/implementation/base/src/main/resources/META-INF/api/core.terradoc b/common/implementation/base/src/main/resources/META-INF/api/core.terradoc new file mode 100644 index 0000000000..b2332f3a58 --- /dev/null +++ b/common/implementation/base/src/main/resources/META-INF/api/core.terradoc @@ -0,0 +1,265 @@ +{ + "id": "terra", + "docVersion": 1, + "description": "Terra core configuration types and pack manifest fields. Shared object shapes and union variants are contributed by the addons that register their implementations.", + "types": { + "Expression": { + "kind": "expr", + "name": "Paralithic", + "description": "A mathematical expression evaluated to a floating-point number. Available variables and functions depend on the consuming configuration; pack variables are configured under variables.", + "examples": ["3 + 2 / 8", "atan2(x, z)"] + }, + "Range": { + "kind": "oneOf", + "description": "An integer range with an inclusive minimum and exclusive maximum. A single integer n denotes [n, n + 1).", + "options": [ + { "kind": "integer" }, + { + "kind": "object", + "fields": { + "min": { "schema": { "kind": "integer" }, "required": true, "summary": "Inclusive minimum." }, + "max": { "schema": { "kind": "integer" }, "required": true, "summary": "Exclusive maximum." } + } + } + ], + "examples": [3, { "min": 2, "max": 5 }] + }, + "Version": { + "kind": "string", + "description": "A version string parsed by Strata. Quote versions in YAML so they remain strings.", + "examples": ["1.0.0"] + }, + "VersionRange": { + "kind": "string", + "description": "An addon dependency version range parsed by Strata. It must be a YAML string." + }, + "WeightedList": { + "kind": "oneOf", + "description": "The unparameterized ProbabilityCollection representation: an item identifier, an item-to-integer-weight mapping, or a sequence of such mappings. A singleton collection with one entry ignores its weight. Addons must specialize the item schema for their consuming type; v1 has no generic type parameters.", + "options": [ + { "kind": "string" }, + { + "kind": "keyMap", + "maxEntries": 1, + "keys": { "kind": "any", "name": "Collection item" }, + "values": { "kind": "any", "name": "Ignored singleton weight" } + }, + { + "kind": "keyMap", + "minEntries": 2, + "keys": { "kind": "string" }, + "values": { "kind": "integer" } + }, + { + "kind": "list", + "maxItems": 1, + "element": { + "kind": "oneOf", + "options": [ + { + "kind": "keyMap", + "maxEntries": 1, + "keys": { "kind": "any", "name": "Collection item" }, + "values": { "kind": "any", "name": "Ignored singleton weight" } + }, + { + "kind": "keyMap", + "minEntries": 2, + "keys": { "kind": "string" }, + "values": { "kind": "integer" } + } + ] + } + }, + { + "kind": "list", + "minItems": 2, + "element": { + "kind": "keyMap", + "keys": { "kind": "string" }, + "values": { "kind": "integer" } + } + } + ], + "examples": ["PLAINS", { "PLAINS": 3, "FOREST": 1 }, [{ "PLAINS": 3 }, { "FOREST": 1 }]] + }, + "NoiseSampler": { + "kind": "union", + "discriminator": "type", + "description": "An inline sampler that produces a numeric value from a position and seed. Sampler addons contribute variants selected by type." + }, + "BiomeProvider": { + "kind": "union", + "discriminator": "type", + "description": "An inline biome provider that chooses a Terra biome for a position. Biome provider addons contribute variants selected by type." + }, + "Distributor": { + "kind": "union", + "discriminator": "type", + "description": "An inline distributor that determines which columns allow feature placement. Distributor addons contribute variants selected by type." + }, + "Locator": { + "kind": "union", + "discriminator": "type", + "description": "An inline locator that determines eligible vertical positions for feature placement. Locator addons contribute variants selected by type." + }, + "GenerationStage": { + "kind": "union", + "discriminator": "type", + "description": "An inline generation stage. Stages run in the order listed in pack.yml after the initial chunk generator. Stage addons contribute variants selected by type." + }, + "ChunkGenerator": { + "kind": "string", + "description": "A registered chunk generator provider identifier, not an inline type-discriminated object. Generator addons register the available identifiers.", + "examples": ["NOISE_3D"] + }, + "Biome": { + "kind": "object", + "description": "Shared configuration target for registered Terra biomes. The config-biome addon contributes its configuration shape; consumers use ref targeting terra:Biome for biome identifiers." + }, + "Palette": { + "kind": "object", + "description": "Shared configuration target for registered palettes. The config-palette addon contributes its configuration shape; consumers use ref targeting terra:Palette for palette identifiers. Shortcut representations belong to their registering addons." + }, + "Feature": { + "kind": "object", + "description": "Shared configuration target for registered features. The config-feature addon contributes its configuration shape; consumers use ref targeting terra:Feature for feature identifiers." + }, + "Structure": { + "kind": "string", + "description": "A raw structure registry identifier, for example a TerraScript or schematic structure. This is distinct from a STRUCTURE configuration producing a ConfiguredStructure. Loader addons define the available identifiers and shortcuts." + }, + "Block": { + "kind": "string", + "description": "A platform-specific block state identifier. Minecraft platforms accept a block identifier with optional bracketed state properties.", + "examples": ["minecraft:grass_block", "minecraft:note_block[instrument=harp,note=9]"] + }, + "MaterialSet": { + "kind": "list", + "element": { "kind": "type", "target": "Block" }, + "description": "A sequence of platform block identifiers loaded into a MaterialSet. Repeated identifiers collapse into the same material." + }, + "Tag": { + "kind": "string", + "description": "A biome tag used to group biomes for distribution. Biomes also have the implicit ALL tag and their own identifier as a tag." + }, + "PlatformBiome": { + "kind": "string", + "description": "A platform-specific biome identifier. Minecraft platforms use identifiers such as minecraft:plains; available values depend on the platform and installed content.", + "examples": ["minecraft:plains"] + }, + "ExpressionOptions": { + "kind": "object", + "fields": { + "use-let-expressions": { + "schema": { "kind": "boolean" }, + "required": false, + "default": false, + "summary": "Enable Paralithic let expressions." + } + } + } + }, + "files": { + "pack.yml": { + "kind": "object", + "description": "The config pack manifest. Addons may contribute additional pack-wide fields directly to this root object.", + "fields": { + "id": { "schema": { "kind": "string" }, "required": true, "summary": "The config pack identifier used by the platform to select a world generator." }, + "author": { "schema": { "kind": "string" }, "required": false, "default": "Anon Y. Mous", "summary": "Who developed the config pack." }, + "version": { "schema": { "kind": "type", "target": "Version" }, "required": true, "summary": "The config pack version." }, + "addons": { + "schema": { + "kind": "keyMap", + "keys": { "kind": "string", "description": "An installed addon identifier." }, + "values": { "kind": "type", "target": "VersionRange" } + }, + "required": false, + "default": {}, + "summary": "Addon dependencies and their allowed version ranges." + }, + "variables": { + "schema": { "kind": "keyMap", "keys": { "kind": "string" }, "values": { "kind": "float" } }, + "required": false, + "default": {}, + "summary": "Pack-wide numeric expression variables." + }, + "generator": { "schema": { "kind": "type", "target": "ChunkGenerator" }, "required": true, "summary": "The generator used for initial chunk generation." }, + "biomes": { "schema": { "kind": "type", "target": "BiomeProvider" }, "required": true, "summary": "Determines which biomes generate at each position." }, + "stages": { "schema": { "kind": "list", "element": { "kind": "type", "target": "GenerationStage" } }, "required": false, "default": [], "summary": "Generation stages applied sequentially after initial chunk generation." }, + "expressions": { + "schema": { + "kind": "object", + "fields": { + "options": { "schema": { "kind": "type", "target": "ExpressionOptions" }, "required": false, "default": { "use-let-expressions": false } } + } + }, + "required": false + }, + "beta": { + "schema": { "kind": "object", "fields": { "carving": { "schema": { "kind": "boolean" }, "required": false, "default": false } } }, + "required": false + }, + "structures": { + "schema": { + "kind": "object", + "fields": { + "locatable": { "schema": { "kind": "keyMap", "keys": { "kind": "string" }, "values": { "kind": "string" } }, "required": false, "default": {} } + } + }, + "required": false + }, + "blend": { + "schema": { + "kind": "object", + "fields": { + "terrain": { + "schema": { "kind": "object", "fields": { "elevation": { "schema": { "kind": "integer" }, "required": false, "default": 4 } } }, + "required": false + } + } + }, + "required": false + }, + "vanilla": { + "schema": { + "kind": "object", + "fields": { + "mobs": { "schema": { "kind": "boolean" }, "required": false, "default": true }, + "caves": { "schema": { "kind": "boolean" }, "required": false, "default": false }, + "decorations": { "schema": { "kind": "boolean" }, "required": false, "default": false }, + "structures": { "schema": { "kind": "boolean" }, "required": false, "default": false } + } + }, + "required": false + }, + "disable": { + "schema": { + "kind": "object", + "fields": { + "sapling": { "schema": { "kind": "boolean" }, "required": false, "default": false }, + "carvers": { "schema": { "kind": "boolean" }, "required": false, "default": false }, + "structures": { "schema": { "kind": "boolean" }, "required": false, "default": false }, + "ores": { "schema": { "kind": "boolean" }, "required": false, "default": false }, + "trees": { "schema": { "kind": "boolean" }, "required": false, "default": false }, + "flora": { "schema": { "kind": "boolean" }, "required": false, "default": false } + } + }, + "required": false + }, + "cache": { + "schema": { + "kind": "object", + "fields": { + "biome": { + "schema": { "kind": "object", "fields": { "enable": { "schema": { "kind": "boolean" }, "required": false, "default": false } } }, + "required": false + } + } + }, + "required": false + } + } + } + } +} diff --git a/platforms/minestom/src/main/resources/META-INF/api/config.terradoc b/platforms/minestom/src/main/resources/META-INF/api/config.terradoc new file mode 100644 index 0000000000..ff17f257d2 --- /dev/null +++ b/platforms/minestom/src/main/resources/META-INF/api/config.terradoc @@ -0,0 +1,314 @@ +{ + "id": "terra-minestom", + "docVersion": 1, + "description": "Platform addon biome extensions registered directly by TerraMinestomPlatform. Covers active VanillaBiomeProperties fields and platform object loaders; commented-out music configuration is not registered.", + "types": { + "terra:Biome": { + "kind": "object", + "fields": { + "colors": { + "schema": { + "kind": "object", + "fields": { + "grass": { + "schema": { + "kind": "type", + "target": "RGBColor", + "nullable": true + }, + "required": false, + "default": null, + "summary": "Packed integer RGB; high bits are ignored by Minestom Color." + }, + "fog": { + "schema": { + "kind": "type", + "target": "RGBColor", + "nullable": true + }, + "required": false, + "default": null, + "summary": "Packed integer RGB; high bits are ignored by Minestom Color." + }, + "water": { + "schema": { + "kind": "type", + "target": "RGBColor", + "nullable": true + }, + "required": false, + "default": null, + "summary": "Packed integer RGB; high bits are ignored by Minestom Color." + }, + "water-fog": { + "schema": { + "kind": "type", + "target": "RGBColor", + "nullable": true + }, + "required": false, + "default": null, + "summary": "Packed integer RGB; high bits are ignored by Minestom Color." + }, + "foliage": { + "schema": { + "kind": "type", + "target": "RGBColor", + "nullable": true + }, + "required": false, + "default": null, + "summary": "Packed integer RGB; high bits are ignored by Minestom Color." + }, + "sky": { + "schema": { + "kind": "type", + "target": "RGBColor", + "nullable": true + }, + "required": false, + "default": null, + "summary": "Packed integer RGB; high bits are ignored by Minestom Color." + }, + "modifier": { + "schema": { + "kind": "enum", + "values": [ + "NONE", + "DARK_FOREST", + "SWAMP" + ], + "nullable": true + }, + "required": false, + "default": null + } + }, + "nullable": true + }, + "required": false + }, + "climate": { + "schema": { + "kind": "object", + "fields": { + "precipitation": { + "schema": { + "kind": "boolean", + "nullable": true + }, + "required": false, + "default": null + }, + "temperature": { + "schema": { + "kind": "float", + "nullable": true + }, + "required": false, + "default": null + }, + "temperature-modifier": { + "schema": { + "kind": "enum", + "values": [ + "NONE", + "FROZEN" + ], + "nullable": true + }, + "required": false, + "default": null, + "summary": "Loaded into properties but not applied by the current default biome factory." + }, + "downfall": { + "schema": { + "kind": "float", + "nullable": true + }, + "required": false, + "default": null + } + }, + "nullable": true + }, + "required": false + }, + "particles": { + "schema": { + "kind": "type", + "target": "Particle", + "nullable": true + }, + "required": false, + "default": null + }, + "sound": { + "schema": { + "kind": "object", + "fields": { + "loop-sound": { + "schema": { + "kind": "object", + "fields": { + "sound": { + "schema": { + "kind": "type", + "target": "SoundEvent", + "nullable": true + }, + "required": false, + "default": null + } + }, + "nullable": true + }, + "required": false + }, + "mood-sound": { + "schema": { + "kind": "type", + "target": "MoodSound", + "nullable": true + }, + "required": false, + "default": null + }, + "additions-sound": { + "schema": { + "kind": "type", + "target": "AdditionsSound", + "nullable": true + }, + "required": false, + "default": null + } + }, + "nullable": true + }, + "required": false + } + }, + "description": "Minestom biome fields loaded for every Terra biome. No numeric expression preprocessing. Water/foliage/grass/modifier and precipitation/temperature/downfall fall back to the platform biome (or plains if absent). Fog/sky/water-fog, particles and ambient sounds are applied separately as environment attributes; no parent fallback is supplied for these fields." + }, + "RGBColor": { + "kind": "integer", + "description": "RGBLikeLoader requires a Java Integer. Minestom Color extracts the low 24 bits as RGB; no 0\u20130xFFFFFF bound is enforced." + }, + "Key": { + "kind": "string", + "description": "Adventure key string: optional lowercase namespace followed by colon and value. Omitted or empty namespace defaults to minecraft. Key.key validates character sets.", + "pattern": "^(?:[a-z0-9_.-]*:)?[a-z0-9_./-]*$" + }, + "SoundEvent": { + "kind": "object", + "fields": { + "id": { + "schema": { + "kind": "type", + "target": "Key", + "nullable": true + }, + "required": false, + "default": null, + "summary": "Without an ID this template returns null." + }, + "distance-to-travel": { + "schema": { + "kind": "float", + "nullable": true + }, + "required": false, + "default": null, + "summary": "Null is explicitly supported by SoundEvent.of." + } + }, + "description": "Inline sound event object, not a bare sound ID." + }, + "MoodSound": { + "kind": "object", + "fields": { + "sound": { + "schema": { + "kind": "type", + "target": "SoundEvent", + "nullable": true + }, + "required": false, + "default": null + }, + "cultivation-ticks": { + "schema": { + "kind": "integer", + "nullable": true + }, + "required": false, + "default": null + }, + "spawn-range": { + "schema": { + "kind": "integer", + "nullable": true + }, + "required": false, + "default": null + }, + "extra-distance": { + "schema": { + "kind": "float", + "nullable": true + }, + "required": false, + "default": null + } + }, + "description": "Returns null without sound. With sound present, the remaining values are passed to primitive constructor parameters: omitted/null values can fail by unboxing. Template loading itself marks all fields optional." + }, + "AdditionsSound": { + "kind": "object", + "fields": { + "sound": { + "schema": { + "kind": "type", + "target": "SoundEvent", + "nullable": true + }, + "required": false, + "default": null + }, + "sound-chance": { + "schema": { + "kind": "float", + "nullable": true + }, + "required": false, + "default": null + } + }, + "description": "Returns null without sound. With sound present, sound-chance is unboxed by the constructor and omission/null can fail. Template loading marks both fields optional." + }, + "Particle": { + "kind": "object", + "fields": { + "particle": { + "schema": { + "kind": "string", + "nullable": true + }, + "required": false, + "default": null, + "summary": "Particle key, optionally followed by an SNBT compound; data is decoded through Particle.CODEC." + }, + "probability": { + "schema": { + "kind": "float", + "nullable": true + }, + "required": false, + "default": null + } + }, + "description": "Returns null unless both particle and probability are supplied. Invalid additional SNBT data is logged and ignored. No template probability bounds are enforced." + } + } +} From 8b14615bf298e5ae4b2a6ab9f47d121d2100dfc8 Mon Sep 17 00:00:00 2001 From: Christian Bergschneider Date: Sat, 3 Oct 2026 14:50:57 +0200 Subject: [PATCH 2/2] feat: update to minestom 26_3 --- buildSrc/src/main/kotlin/DependencyConfig.kt | 6 ++++++ buildSrc/src/main/kotlin/Versions.kt | 2 +- .../dfsek/terra/registry/master/ConfigRegistry.java | 2 +- .../terra/registry/master/MetaConfigRegistry.java | 2 +- .../minestom/config/BiomeParticleConfigTemplate.java | 12 ++++++++++++ 5 files changed, 21 insertions(+), 3 deletions(-) diff --git a/buildSrc/src/main/kotlin/DependencyConfig.kt b/buildSrc/src/main/kotlin/DependencyConfig.kt index 47e3475a8c..4a50298dc0 100644 --- a/buildSrc/src/main/kotlin/DependencyConfig.kt +++ b/buildSrc/src/main/kotlin/DependencyConfig.kt @@ -60,6 +60,12 @@ fun Project.configureDependencies() { maven("https://repo.onarandombox.com/multiverse-releases") { name = "onarandombox" } + maven(url = "https://central.sonatype.com/repository/maven-snapshots/") { + content { + includeModule("net.minestom", "minestom") + includeModule("net.minestom", "testing") + } + } } dependencies { diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index ae15639cfb..a1ea788525 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -96,6 +96,6 @@ object Versions { } object Minestom { - const val minestom = "2025.12.20c-1.21.11" + const val minestom = "26_3-SNAPSHOT" } } diff --git a/common/implementation/base/src/main/java/com/dfsek/terra/registry/master/ConfigRegistry.java b/common/implementation/base/src/main/java/com/dfsek/terra/registry/master/ConfigRegistry.java index 08343d59f9..2d39ead5d1 100644 --- a/common/implementation/base/src/main/java/com/dfsek/terra/registry/master/ConfigRegistry.java +++ b/common/implementation/base/src/main/java/com/dfsek/terra/registry/master/ConfigRegistry.java @@ -68,7 +68,7 @@ public String getRegistryName() { @Override public boolean validatePathIsMember(Path path) { - return Files.isDirectory(path)|| path.getFileName().endsWith(".zip"); + return Files.isDirectory(path)|| path.getFileName().toString().endsWith(".zip"); } public static class PackLoadFailuresException extends Exception { diff --git a/common/implementation/base/src/main/java/com/dfsek/terra/registry/master/MetaConfigRegistry.java b/common/implementation/base/src/main/java/com/dfsek/terra/registry/master/MetaConfigRegistry.java index 65a4164001..ed129b0ab0 100644 --- a/common/implementation/base/src/main/java/com/dfsek/terra/registry/master/MetaConfigRegistry.java +++ b/common/implementation/base/src/main/java/com/dfsek/terra/registry/master/MetaConfigRegistry.java @@ -68,6 +68,6 @@ public String getRegistryName() { @Override public boolean validatePathIsMember(Path path) { - return Files.isDirectory(path) || path.getFileName().endsWith(".zip"); + return Files.isDirectory(path) || path.getFileName().toString().endsWith(".zip"); } } diff --git a/platforms/minestom/src/main/java/com/dfsek/terra/minestom/config/BiomeParticleConfigTemplate.java b/platforms/minestom/src/main/java/com/dfsek/terra/minestom/config/BiomeParticleConfigTemplate.java index cf66e61a0c..acc74b5461 100644 --- a/platforms/minestom/src/main/java/com/dfsek/terra/minestom/config/BiomeParticleConfigTemplate.java +++ b/platforms/minestom/src/main/java/com/dfsek/terra/minestom/config/BiomeParticleConfigTemplate.java @@ -4,6 +4,7 @@ import com.dfsek.tectonic.api.config.template.annotations.Value; import com.dfsek.tectonic.api.config.template.object.ObjectTemplate; import net.kyori.adventure.nbt.CompoundBinaryTag; +import net.kyori.adventure.nbt.StringBinaryTag; import net.minestom.server.adventure.MinestomAdventure; import net.minestom.server.codec.Transcoder; import net.minestom.server.particle.Particle; @@ -51,6 +52,17 @@ private Particle parseAdditionalParticleData(String dataString, String key) { nbt = MinestomAdventure.NBT_CODEC.decode(dataString); // transform minecraft:x{a:"b"} into {type:"minecraft:x", a:"b"} as described in Particle.CODEC nbt = nbt.putString("type", key); + + // TODO fix this + CompoundBinaryTag blockState = nbt.getCompound("block_state", null); + if (blockState != null) { + String name = blockState.getString("Name", null); + if (name != null) { + blockState = blockState.put("id", StringBinaryTag.stringBinaryTag(name)); + nbt = nbt.put("block_state", blockState); + } + } + parsedParticle = Particle.CODEC.decode(Transcoder.NBT, nbt).orElseThrow(); } catch(Exception e) { String nbtString = "null";