1
0
mirror of https://github.com/SKCraft/Launcher.git synced 2024-11-23 12:05:44 +01:00

Fix forge loaders being named wrong & warning for wrong loader version

This commit is contained in:
Henry Le Grys 2020-12-25 00:49:55 +00:00
parent dd62193b0b
commit d6ac0983de
2 changed files with 10 additions and 2 deletions

View File

@ -47,8 +47,8 @@ public class ModernForgeLoaderProcessor implements ILoaderProcessor {
VersionInfo.class);
VersionManifest version = manifest.getVersionManifest();
if (version.getId() != null) {
loaderName = version.getId();
if (info.getId() != null) {
loaderName = info.getId();
}
// Copy game arguments
@ -89,6 +89,13 @@ public class ModernForgeLoaderProcessor implements ILoaderProcessor {
ModernForgeInstallProfile profile = mapper.readValue(data, ModernForgeInstallProfile.class);
if (!profile.getMinecraft().equals(manifest.getGameVersion())) {
// TODO: Ideally this would show up as a Problem when running the check command.
// Getting the data from here to there is quite difficult, however.
log.warning(String.format("The Forge installer inside loaders/ is for Minecraft version %s; your " +
"manifest is set to %s.", profile.getMinecraft(), manifest.getGameVersion()));
}
// Import the libraries for the installer
result.getProcessorLibraries().addAll(profile.getLibraries());

View File

@ -24,6 +24,7 @@ public class ModernForgeInstallProfile {
private List<Library> libraries;
private List<InstallProcessor> processors;
private Map<String, SidedData<String>> data;
private String minecraft;
public List<ProcessorEntry> toProcessorEntries(final String loaderName) {
return Lists.transform(getProcessors(), new Function<InstallProcessor, ProcessorEntry>() {