diff --git a/build.gradle b/build.gradle index 0a8f7918e7..b506022fb3 100644 --- a/build.gradle +++ b/build.gradle @@ -303,6 +303,7 @@ project(':forge') { installer 'java3d:vecmath:1.5.2' installer 'net.sf.trove4j:trove4j:3.0.3' installer 'org.apache.maven:maven-artifact:3.5.3' + installer 'net.sf.jopt-simple:jopt-simple:5.0.3' testImplementation 'org.junit.jupiter:junit-jupiter-api:5.0.0' testImplementation 'org.junit.vintage:junit-vintage-engine:5.+' @@ -627,9 +628,19 @@ project(':forge') { rename{'binpatches.pack.lzma'} } doFirst { + def classpath = new StringBuilder() + def artifacts = getArtifacts(project, project.configurations.installer, false) + artifacts.each { key, lib -> + classpath.append("libraries/${lib.downloads.artifact.path} ") + } + classpath += "minecraft_server.${MC_VERSION}.jar" MANIFESTS.each{ pkg, values -> if (pkg == '/') { - manifest.attributes(values) + manifest.attributes(values += [ + 'Main-Class': 'net.minecraftforge.fml.relauncher.ServerLaunchWrapper', + 'Class-Path': classpath.toString(), + 'Tweak-Class': 'net.minecraftforge.fml.common.launcher.FMLTweaker' + ]) } else { manifest.attributes(values, pkg) } diff --git a/mdk/build.gradle b/mdk/build.gradle index f41cdad391..2b93b6c8e5 100644 --- a/mdk/build.gradle +++ b/mdk/build.gradle @@ -60,8 +60,7 @@ dependencies { // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed // that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied. // The userdev artifact is a special name and will get all sorts of transformations applied to it. - //minecraft '@FORGE_GROUP@:@FORGE_NAME@:@FORGE_VERSION@' - minecraft 'net.minecraftforge:forge:1.12.2-14.23.5.2849' + minecraft '@FORGE_GROUP@:@FORGE_NAME@:@FORGE_VERSION@' // You may put jars on which you depend on in ./libs or you may define them like so.. // compile "some.group:artifact:version:classifier" @@ -115,4 +114,4 @@ publishing { url "file:///${project.projectDir}/mcmodsrepo" } } -} \ No newline at end of file +}