mirror of
https://github.com/MinecraftForge/MinecraftForge
synced 2026-08-22 04:26:10 -04:00
Fixed the universal jar not having a main class or classpath, for server installations.
This commit is contained in:
parent
0683971741
commit
87a63bc5e0
2 changed files with 14 additions and 4 deletions
13
build.gradle
13
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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue