Attempt to remove arch and add AWToAt.java
This commit is contained in:
+134
-50
@@ -1,15 +1,12 @@
|
||||
plugins {
|
||||
// Note: This is only needed for multi-loader projects
|
||||
// The main architectury loom version is set at the start of the root build.gradle
|
||||
id "architectury-plugin" version "3.4-SNAPSHOT"
|
||||
}
|
||||
apply plugin: 'net.minecraftforge.gradle'
|
||||
apply plugin: 'org.spongepowered.mixin'
|
||||
|
||||
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17
|
||||
//sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17
|
||||
|
||||
architectury {
|
||||
platformSetupLoomIde()
|
||||
forge()
|
||||
}
|
||||
//architectury {
|
||||
// platformSetupLoomIde()
|
||||
// forge()
|
||||
//}
|
||||
|
||||
//loom {
|
||||
// forge {
|
||||
@@ -19,61 +16,138 @@ architectury {
|
||||
// }
|
||||
//}
|
||||
|
||||
loom {
|
||||
silentMojangMappingsLicense() // Shut the licencing warning
|
||||
accessWidenerPath = project(":common").file("src/main/resources/${accessWidenerVersion}.distanthorizons.accesswidener")
|
||||
//loom {
|
||||
// silentMojangMappingsLicense() // Shut the licencing warning
|
||||
// accessWidenerPath = project(":common").file("src/main/resources/${accessWidenerVersion}.distanthorizons.accesswidener")
|
||||
//
|
||||
// forge {
|
||||
// convertAccessWideners = true
|
||||
// extraAccessWideners.add loom.accessWidenerPath.get().asFile.name
|
||||
//
|
||||
// mixinConfigs = [
|
||||
// "DistantHorizons.forge.mixins.json"
|
||||
// ]
|
||||
// }
|
||||
//
|
||||
// // "runs" isn't required, but when we do need it then it can be useful
|
||||
// runs {
|
||||
// client {
|
||||
// client()
|
||||
// setConfigName("Forge Client")
|
||||
// ideConfigGenerated(true)
|
||||
// runDir("../run")
|
||||
//// vmArgs("-XX:-OmitStackTraceInFastThrow", minecraftMemoryJavaArg)
|
||||
// }
|
||||
// server {
|
||||
// server()
|
||||
// setConfigName("Forge Server")
|
||||
// ideConfigGenerated(true)
|
||||
// runDir("../run")
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
forge {
|
||||
convertAccessWideners = true
|
||||
extraAccessWideners.add loom.accessWidenerPath.get().asFile.name
|
||||
|
||||
mixinConfigs = [
|
||||
"DistantHorizons.forge.mixins.json"
|
||||
]
|
||||
}
|
||||
|
||||
// "runs" isn't required, but when we do need it then it can be useful
|
||||
minecraft {
|
||||
mappings channel: 'official', version: minecraft_version
|
||||
accessTransformer = project(":common").file('src/main/resources/META-INF/accesstransformer.cfg')
|
||||
runs {
|
||||
client {
|
||||
client()
|
||||
setConfigName("Forge Client")
|
||||
ideConfigGenerated(true)
|
||||
runDir("../run")
|
||||
// vmArgs("-XX:-OmitStackTraceInFastThrow", minecraftMemoryJavaArg)
|
||||
workingDirectory project.file('run')
|
||||
ideaModule "${rootProject.name}.${project.name}.main"
|
||||
taskName 'Client'
|
||||
args "-mixins.config=${mod_name}.forge.mixins.json"
|
||||
mods {
|
||||
modClientRun {
|
||||
source sourceSets.main
|
||||
source project(":common").sourceSets.main
|
||||
source project(":api").sourceSets.main
|
||||
source project(":core").sourceSets.main
|
||||
}
|
||||
}
|
||||
property 'forge.enabledGameTestNamespaces', mod_id
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
properties 'mixin.env.remapRefMap': 'true'
|
||||
property 'mixin.env.refMapRemappingFile', "${project.projectDir}/build/createSrgToMcp/output.srg"
|
||||
}
|
||||
|
||||
server {
|
||||
server()
|
||||
setConfigName("Forge Server")
|
||||
ideConfigGenerated(true)
|
||||
runDir("../run")
|
||||
workingDirectory project.file('run')
|
||||
ideaModule "${rootProject.name}.${project.name}.main"
|
||||
taskName 'Server'
|
||||
args "-mixins.config=${mod_name}.forge.mixins.json"
|
||||
mods {
|
||||
modServerRun {
|
||||
source sourceSets.main
|
||||
source project(":common").sourceSets.main
|
||||
source project(":api").sourceSets.main
|
||||
source project(":core").sourceSets.main
|
||||
}
|
||||
}
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
properties 'mixin.env.remapRefMap': 'true'
|
||||
property 'mixin.env.refMapRemappingFile', "${project.projectDir}/build/createSrgToMcp/output.srg"
|
||||
}
|
||||
|
||||
data {
|
||||
workingDirectory project.file('run')
|
||||
ideaModule "${rootProject.name}.${project.name}.main"
|
||||
args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
|
||||
taskName 'Data'
|
||||
args "-mixins.config=${mod_name}.forge.mixins.json"
|
||||
mods {
|
||||
modDataRun {
|
||||
source sourceSets.main
|
||||
source project(":common").sourceSets.main
|
||||
source project(":api").sourceSets.main
|
||||
source project(":core").sourceSets.main
|
||||
}
|
||||
}
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
}
|
||||
}
|
||||
}
|
||||
sourceSets.main.resources.srcDir 'src/generated/resources'
|
||||
|
||||
remapJar {
|
||||
inputFile = shadowJar.archiveFile
|
||||
dependsOn shadowJar
|
||||
// classifier null
|
||||
//remapJar {
|
||||
// inputFile = shadowJar.archiveFile
|
||||
// dependsOn shadowJar
|
||||
//// classifier null
|
||||
//}
|
||||
shadowJar {
|
||||
finalizedBy 'reobfShadowJar'
|
||||
}
|
||||
jar.dependsOn('shadowJar')
|
||||
reobf {
|
||||
shadowJar {}
|
||||
}
|
||||
|
||||
minecraft.runs.all {
|
||||
lazyToken('minecraft_classpath') {
|
||||
// configurations.implementation.exclude group: 'org.jetbrains', module: 'annotations'
|
||||
// configurations.implementation.copyRecursive().resolve().collect { it.absolutePath }.join(File.pathSeparator)
|
||||
// configurations.runtimeLibrary.copyRecursive().resolve().collect { it.absolutePath }.join(File.pathSeparator)
|
||||
}
|
||||
}
|
||||
|
||||
def addMod(path, enabled) {
|
||||
if (enabled == "2")
|
||||
dependencies { implementation(path) }
|
||||
// dependencies { implementation(path) }
|
||||
dependencies { implementation(fg.deobf(path)) }
|
||||
else if (enabled == "1")
|
||||
dependencies { modCompileOnly(path) }
|
||||
// dependencies { modCompileOnly(path) }
|
||||
dependencies { compileOnly(fg.deobf(path)) }
|
||||
}
|
||||
dependencies {
|
||||
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
|
||||
mappings loom.layered() {
|
||||
// Mojmap mappings
|
||||
officialMojangMappings()
|
||||
// Parchment mappings (it adds parameter mappings & javadoc)
|
||||
parchment("org.parchmentmc.data:parchment-${rootProject.parchment_version}@zip")
|
||||
}
|
||||
// minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
|
||||
// mappings loom.layered() {
|
||||
// // Mojmap mappings
|
||||
// officialMojangMappings()
|
||||
// // Parchment mappings (it adds parameter mappings & javadoc)
|
||||
// parchment("org.parchmentmc.data:parchment-${rootProject.parchment_version}@zip")
|
||||
// }
|
||||
|
||||
// Forge
|
||||
forge "net.minecraftforge:forge:${rootProject.minecraft_version}-${rootProject.forge_version}"
|
||||
minecraft "net.minecraftforge:forge:${rootProject.minecraft_version}-${rootProject.forge_version}"
|
||||
|
||||
// Architectury API
|
||||
// if (minecraft_version == "1.16.5") {
|
||||
@@ -89,12 +163,18 @@ dependencies {
|
||||
addMod("curse.maven:TerraForged-363820:${rootProject.terraforged_version}", rootProject.enable_terraforged)
|
||||
|
||||
addMod("curse.maven:TerraFirmaCraft-302973:4616004", rootProject.enable_terrafirmacraft)
|
||||
|
||||
annotationProcessor "org.spongepowered:mixin:0.8.5:processor"
|
||||
|
||||
// if (System.getProperty("idea.sync.active") != "true") {
|
||||
// annotationProcessor "org.spongepowered:mixin:0.8.4:processor"
|
||||
// }
|
||||
}
|
||||
|
||||
mixin {
|
||||
add sourceSets.main, "${mod_name}-forge-refmap.json"
|
||||
}
|
||||
|
||||
task deleteResources(type: Delete) {
|
||||
delete file("build/resources/main")
|
||||
}
|
||||
@@ -108,10 +188,14 @@ processResources {
|
||||
dependsOn(tasks.named('copyAllResources'))
|
||||
}
|
||||
|
||||
tasks.named('runClient') {
|
||||
dependsOn(tasks.named('copyAllResources'))
|
||||
finalizedBy(deleteResources)
|
||||
}
|
||||
//processResources {
|
||||
// dependsOn(tasks.named('copyAllResources'))
|
||||
//}
|
||||
|
||||
//tasks.named('prepareClient') {
|
||||
// dependsOn(tasks.named('copyAllResources'))
|
||||
// finalizedBy(deleteResources)
|
||||
//}
|
||||
|
||||
|
||||
sourcesJar {
|
||||
|
||||
Reference in New Issue
Block a user