Files
Iris/gradle/native-minecraft-sources.gradle
T
Brian Neumann-Fopiano ca9f28c9b0 Expanded terrain generation tooling
- Standalone Minecraft 26.3 generation uses native registries, biome planning and structure planning with bounded concurrency
- Offline export publishes fresh TERRAIN checkpoints for native server completion
- Checkpoints retain mantle data, immutable generation history and captured server configuration
- Output publication uses staged directories, durability checks and atomic moves
- Offline distribution tasks provide an installed launcher and reusable native fixtures
- Dimension settings control terrain, biome-bound and cave-density sampling with unchanged defaults
- Pack validation and schemas enforce the supported sampling intervals
- Biome layer caches isolate data, engine and seed identities
- Floating biome palettes keep stable thickness patterns across generation orders
- Hydrology batches terrain samples within the owning generation runtime
- Hydrology planners share bounded basis caches and reuse raster geometry and distance samples
- Demand planning admits new tiles as active plans finish
- Volumetric height queries avoid unnecessary density evaluation and bound cached anchors
- Cave generation reuses chunk-scoped inputs and semantic capture
- Object replay indexes mutations by destination and reuses resolved records
- Source-plan caches coordinate concurrent builds and reduce overlay allocation
- Prerequisite carving reads preserve the underlying hydrology before object placement
- Tree material decoding preserves stored native block identities
- Engine shutdown drains generation outside the lifecycle lock and coordinates runtime retirement
- Pregeneration sizes temporary worker boosts from processor and heap capacity
- Pregeneration restores native worker counts after drain and failure paths
- Native structure queries retain per-origin coordination without broad window locks
- Saved biome writes drain pending batches under their write stripe
- Boundary column lookups avoid repeated voxel decoding
- Modded registry consumers use explicit VolmLib providers and version-specific native source overlays
- Regression tests cover generation parity, cache isolation, concurrency, shutdown, persistence and offline checkpoints
2026-09-23 07:00:55 -04:00

43 lines
2.2 KiB
Groovy

Configuration nativeMinecraftSources = configurations.create('nativeMinecraftSources') {
canBeConsumed = false
canBeResolved = true
}
Properties nativeLibraryProperties = new Properties()
file('../../gradle.properties').withInputStream { InputStream stream -> nativeLibraryProperties.load(stream) }
String nativeLibraryCoordinate = providers.gradleProperty('volmLibCoordinate')
.getOrElse(nativeLibraryProperties.getProperty('volmLibCoordinate'))
String nativeSourceLoader = extensions.extraProperties.get('nativeSourceLoader')
String nativeSourceImplementation = 'minecraft26_2'
String nativeSourceMinecraftVersion = providers.gradleProperty('minecraftVersion').getOrElse('26.2')
extensions.extraProperties.set('nativeSourceImplementation', nativeSourceImplementation)
dependencies.add(nativeMinecraftSources.name,
"com.github.VolmitSoftware.VolmLib:native-${nativeSourceImplementation}-sources:${nativeLibraryCoordinate.tokenize(':').last()}")
TaskProvider<Sync> unpackNativeMinecraftSources = tasks.register('unpackNativeMinecraftSources', Sync) {
dependsOn(nativeMinecraftSources)
from(provider { nativeMinecraftSources.collect { File artifact -> zipTree(artifact) } }) {
include('art/**', 'modded/**', "${nativeSourceLoader}/**",
'resources/modded/**', "resources/${nativeSourceLoader}/**", "versions/${nativeSourceMinecraftVersion}/**")
eachFile { FileCopyDetails source ->
String versionPrefix = "versions/${nativeSourceMinecraftVersion}/"
if (source.path.startsWith(versionPrefix)) {
source.path = source.path.substring(versionPrefix.length())
}
}
}
into(layout.buildDirectory.dir('generated/sources/native-minecraft'))
}
sourceSets.main.java.srcDir(unpackNativeMinecraftSources)
sourceSets.main.resources.srcDir(layout.buildDirectory.dir('generated/sources/native-minecraft/resources/modded'))
sourceSets.main.resources.srcDir(layout.buildDirectory.dir("generated/sources/native-minecraft/resources/${nativeSourceLoader}"))
tasks.named('processResources').configure {
dependsOn(unpackNativeMinecraftSources)
}
tasks.matching { Task task -> task.name == 'createMinecraftArtifacts' }.configureEach {
dependsOn(unpackNativeMinecraftSources)
}