mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-17 11:05:40 +00:00
Better error passing from early to game client launch.
This commit is contained in:
1 parent
c6e7bbe18b
commit
d5e04dbcb5
16 files changed
+183
-119
No files matched your search
@@ -39,14 +39,23 @@ public class ForgeVersion
|
||||
|
||||
private static final String forgeVersion;
|
||||
|
||||
private static final String forgeSpec;
|
||||
|
||||
static {
|
||||
String vers = ForgeVersion.class.getPackage().getImplementationVersion();
|
||||
if (vers == null) {
|
||||
vers = System.getProperty("forge.version");
|
||||
}
|
||||
if (vers == null) throw new RuntimeException("Missing forge version, cannot continue");
|
||||
String spec = ForgeVersion.class.getPackage().getSpecificationVersion();
|
||||
if (spec == null) {
|
||||
spec = System.getProperty("forge.spec");
|
||||
}
|
||||
if (spec == null) throw new RuntimeException("Missing forge spec, cannot continue");
|
||||
forgeVersion = vers;
|
||||
forgeSpec = spec;
|
||||
LOGGER.info(CORE, "Found Forge version {}", forgeVersion);
|
||||
LOGGER.info(CORE, "Found Forge spec {}", forgeSpec);
|
||||
}
|
||||
|
||||
public static String getVersion()
|
||||
@@ -64,5 +73,9 @@ public class ForgeVersion
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
public static String getSpec() {
|
||||
return forgeSpec;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user