mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-26 15:03:04 +00:00
Include project group in ForgeVersion and determine path to patched jar.
While testing we install to net.minecraftforge.test. So don't hardcode it.
This commit is contained in:
1 parent
a3c8e04ee6
commit
76d912c0ba
4 files changed
+29
-10
No files matched your search
@@ -38,8 +38,8 @@ public class ForgeVersion
|
||||
public static final String mcpVersion = "9.42";
|
||||
|
||||
private static final String forgeVersion;
|
||||
|
||||
private static final String forgeSpec;
|
||||
private static final String forgeGroup;
|
||||
|
||||
static {
|
||||
String vers = ForgeVersion.class.getPackage().getImplementationVersion();
|
||||
@@ -52,10 +52,19 @@ public class ForgeVersion
|
||||
spec = System.getProperty("forge.spec");
|
||||
}
|
||||
if (spec == null) throw new RuntimeException("Missing forge spec, cannot continue");
|
||||
String group = ForgeVersion.class.getPackage().getImplementationTitle();
|
||||
if (group == null) {
|
||||
group = System.getProperty("forge.group");
|
||||
}
|
||||
if (group == null) {
|
||||
group = "net.minecraftforge"; // If all else fails, Our normal group
|
||||
}
|
||||
forgeVersion = vers;
|
||||
forgeSpec = spec;
|
||||
forgeGroup = group;
|
||||
LOGGER.info(CORE, "Found Forge version {}", forgeVersion);
|
||||
LOGGER.info(CORE, "Found Forge spec {}", forgeSpec);
|
||||
LOGGER.info(CORE, "Found Forge group {}", forgeGroup);
|
||||
}
|
||||
|
||||
public static String getVersion()
|
||||
@@ -77,5 +86,9 @@ public class ForgeVersion
|
||||
public static String getSpec() {
|
||||
return forgeSpec;
|
||||
}
|
||||
|
||||
public static String getGroup() {
|
||||
return forgeGroup;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user