mirror of
https://github.com/MinecraftForge/MinecraftForge
synced 2026-08-22 04:26:10 -04:00
New Decompiler Runtime Official mappings ItemStacks arnt Capability providers anymore, use Vanilla's system. Co-authored-by: RealMangoRage <64402114+RealMangorage@users.noreply.github.com> Co-authored-by: Paint_Ninja <PaintNinja@users.noreply.github.com>
73 lines
No EOL
1.8 KiB
Groovy
73 lines
No EOL
1.8 KiB
Groovy
plugins {
|
|
id 'java-library'
|
|
id 'net.minecraftforge.gradle.patcher'
|
|
}
|
|
|
|
evaluationDependsOn(':mcp')
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven gradleutils.forgeMaven
|
|
maven gradleutils.minecraftLibsMaven
|
|
}
|
|
|
|
java.toolchain.languageVersion = JavaLanguageVersion.of(JAVA_VERSION)
|
|
|
|
dependencies {
|
|
implementation(libs.forgespi)
|
|
}
|
|
|
|
patcher {
|
|
parent = project(':mcp')
|
|
mcVersion = MC_VERSION
|
|
patchedSrc = file('src/main/java')
|
|
|
|
mappings channel: MAPPING_CHANNEL, version: MAPPING_VERSION
|
|
|
|
runs {
|
|
clean_client {
|
|
client true
|
|
taskName 'clean_client'
|
|
ideaModule "${rootProject.name}.${project.name}.main"
|
|
|
|
main 'net.minecraft.client.main.Main'
|
|
workingDirectory project.file('run/client')
|
|
|
|
args '--gameDir', '.'
|
|
args '--version', MC_VERSION
|
|
args '--assetsDir', downloadAssets.output
|
|
args '--assetIndex', '{asset_index}'
|
|
args '--accessToken', '0'
|
|
}
|
|
|
|
clean_server {
|
|
client false
|
|
taskName 'clean_server'
|
|
ideaModule "${rootProject.name}.${project.name}.main"
|
|
|
|
main 'net.minecraft.server.Main'
|
|
workingDirectory project.file('run/server')
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
|
|
options.warnings = false // Shutup deprecated for removal warnings
|
|
}
|
|
|
|
eclipse.classpath.file.whenMerged {
|
|
// Disable optional warnings on the minecraft decompiled source code. It just muddies the warning window and hides warnings in our own codebase
|
|
def src = entries.find { it.path == 'src/main/java' }
|
|
if (src == null) throw new IllegalStateException("You must run `setup` task before importing")
|
|
src.entryAttributes['ignore_optional_problems'] = 'true'
|
|
}
|
|
|
|
tasks.named('genPatches').configure {
|
|
onlyIf { false }
|
|
}
|
|
|
|
tasks.named('extractRangeMap').configure {
|
|
onlyIf { false }
|
|
tool = 'net.minecraftforge:Srg2Source:8.1.0:fatjar'
|
|
} |