summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Quintana <gigaherz@gmail.com>2018-12-12 05:04:23 +0100
committerLexManos <LexManos@gmail.com>2018-12-11 20:04:23 -0800
commit05761cb243159bc7dcf3cd39d40090993913e804 (patch)
tree58ec30b70d538b1b3ea0212a55f19ccc13f52b6d
parentfb1b05ea040c9141707564da89dd8b0314d81054 (diff)
Create a userdev-specific main, and include it as an injected file in the userdev jar. (#5231)
-rw-r--r--build.gradle24
1 files changed, 22 insertions, 2 deletions
diff --git a/build.gradle b/build.gradle
index ee711d2..ce344c1 100644
--- a/build.gradle
+++ b/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'
}
}