Create a userdev-specific main, and include it as an injected file in the userdev jar. (#5231)
This commit is contained in:
parent
fb1b05ea04
commit
05761cb243
1 changed files with 22 additions and 2 deletions
24
build.gradle
24
build.gradle
|
@ -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'
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue