Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions buildSrc/src/main/kotlin/DistributionConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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<Jar>(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"
Expand Down
Original file line number Diff line number Diff line change
@@ -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
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -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
}
}
}
}
}
}
}
Loading
Loading