Files
VS--Improved-Aerodynamics/build.gradle
richard 4b7fb0e1e8 Add flight physics overhaul with Warium/Futurism mixins
- Route Warium and Futurism force queues through smoothed per-substep delivery
- Evaluate wing, stabilizer, control surface and air brake forces every physics substep
- Add optional improved flight model with angle-of-attack lift and stalls
- Add auto trim toggled by a client key and a server packet
- Add config options, translations, and mixin plugin version gating
- Bump mod version to 0.2.0 and bundle Futurism 0.0.4 as a compile-only dependency
2026-10-28 18:56:25 +01:00

107 lines
3.0 KiB
Groovy

plugins {
id 'eclipse'
id 'idea'
id 'net.minecraftforge.gradle' version '[6.0.16,6.2)'
id 'org.parchmentmc.librarian.forgegradle' version '1.+'
}
group = mod_group_id
version = mod_version
base {
archivesName = mod_id
}
java {
toolchain.languageVersion = JavaLanguageVersion.of(17)
}
minecraft {
mappings channel: mapping_channel, version: mapping_version
copyIdeResources = true
runs {
configureEach {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
mods {
"${mod_id}" {
source sourceSets.main
}
}
}
client {
}
server {
args '--nogui'
}
}
}
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
forRepositories(fg.repository)
filter {
includeGroup "maven.modrinth"
}
}
// Warium VS is not on Modrinth, it is compiled against the jar in libs/
flatDir {
dir 'libs'
}
mavenCentral()
}
dependencies {
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
// Valkyrien Skies 2.4.11 (hard dependency). Its core API ships jar-in-jar, so those jars are extracted into libs/
compileOnly fg.deobf("maven.modrinth:valkyrien-skies:pOkdwuUh")
compileOnly files('libs/vs-core-api-1.1.0.jar', 'libs/vs-core-util-1.1.0.jar', 'libs/joml-primitives-1.10.0.jar')
compileOnly 'org.jetbrains.kotlin:kotlin-stdlib:1.9.22'
// Warium VS 1.1.6 and Futurism 0.0.4 (optional dependencies, the flight physics mixins only apply when they are present)
compileOnly fg.deobf("blank:WariumVS:1.1.6")
compileOnly fg.deobf("blank:futurism:0.0.4")
}
tasks.named('processResources', ProcessResources).configure {
var replaceProperties = [minecraft_version : minecraft_version, minecraft_version_range: minecraft_version_range,
forge_version : forge_version, forge_version_range: forge_version_range,
loader_version_range: loader_version_range,
mod_id : mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version,
mod_authors : mod_authors, mod_description: mod_description,]
inputs.properties replaceProperties
filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) {
expand replaceProperties + [project: project]
}
}
// Every mixin uses remap = false (Warium and VS are not obfuscated), so no refmap is needed
tasks.named('jar', Jar).configure {
manifest {
attributes 'MixinConfigs': "${mod_id}.mixins.json"
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}