Create a userdev-specific main, and include it as an injected file in the userdev jar. (#5231)

This commit is contained in:
David Quintana 2018-12-12 05:04:23 +01:00 committed by LexManos
parent fb1b05ea04
commit 05761cb243

View file

@ -39,6 +39,26 @@ minecraft {
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
//accessTransformer = file('my_at.cfg')
// default run configurations.
// these can be tweaked, removed, or duplicated as needed.
runConfig {
name= "Minecraft Client"
main= "net.minecraftforge.userdev.UserdevLauncher"
ideaModuleName = "${project.name}_main"
workingDirectory = project.file("run").canonicalPath
environment "target", "fmldevclient"
environment "assetDirectory", downloadAssets.output.absolutePath
}
runConfig {
name= "Minecraft Server"
main= "net.minecraftforge.userdev.UserdevLauncher"
ideaModuleName = "${project.name}_main"
workingDirectory = project.file("run").canonicalPath
environment "target", "fmldevserver"
environment "assetDirectory", downloadAssets.output.absolutePath
}
}
dependencies {
@ -76,7 +96,7 @@ processResources {
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
include 'META_INF/mods.toml'
// replace version and mcversion
expand 'version':project.version, 'mcversion': '@MC_VERSION@'
@ -84,6 +104,6 @@ processResources {
// copy everything else except the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
exclude 'META_INF/mods.toml'
}
}