diff --git a/launcher-builder/src/main/java/com/skcraft/launcher/builder/loaders/OldForgeLoaderProcessor.java b/launcher-builder/src/main/java/com/skcraft/launcher/builder/loaders/OldForgeLoaderProcessor.java index 8daa555..c5e970d 100644 --- a/launcher-builder/src/main/java/com/skcraft/launcher/builder/loaders/OldForgeLoaderProcessor.java +++ b/launcher-builder/src/main/java/com/skcraft/launcher/builder/loaders/OldForgeLoaderProcessor.java @@ -86,7 +86,7 @@ public class OldForgeLoaderProcessor implements ILoaderProcessor { ZipEntry libraryEntry = BuilderUtils.getZipEntry(jarFile, filePath); if (libraryEntry != null) { - File librariesDir = new File(baseDir, manifest.getLibrariesLocation()); + File librariesDir = new File(baseDir, "libraries"); File extractPath = new File(librariesDir, Library.mavenNameToPath(libraryPath)); Files.createParentDirs(extractPath); diff --git a/launcher/src/main/java/com/skcraft/launcher/install/ProcessorTask.java b/launcher/src/main/java/com/skcraft/launcher/install/ProcessorTask.java index 86d43ac..9b547ed 100644 --- a/launcher/src/main/java/com/skcraft/launcher/install/ProcessorTask.java +++ b/launcher/src/main/java/com/skcraft/launcher/install/ProcessorTask.java @@ -44,12 +44,12 @@ public class ProcessorTask implements InstallTask { VersionManifest versionManifest = manifest.getVersionManifest(); LoaderSubResolver resolver = new LoaderSubResolver(manifest, loaderManifest, - Environment.getInstance(), Side.CLIENT, launcher.getBaseDir(), localFiles); + Environment.getInstance(), Side.CLIENT, launcher.getLibrariesDir(), localFiles); Map> sidedData = loaderManifest.getSidedData(); sidedData.put("ROOT", SidedData.of(launcher.getInstallerDir().getAbsolutePath())); sidedData.put("MINECRAFT_JAR", SidedData.of(launcher.getJarPath(versionManifest).getAbsolutePath())); - sidedData.put("LIBRARY_DIR", SidedData.of(resolver.getPathOf(manifest.getLibrariesLocation()))); + sidedData.put("LIBRARY_DIR", SidedData.of(launcher.getLibrariesDir().getAbsolutePath())); sidedData.put("MINECRAFT_VERSION", SidedData.of(versionManifest.getId())); message = "Resolving parameters"; diff --git a/launcher/src/main/java/com/skcraft/launcher/model/loader/LoaderSubResolver.java b/launcher/src/main/java/com/skcraft/launcher/model/loader/LoaderSubResolver.java index 3cbe657..9042daa 100644 --- a/launcher/src/main/java/com/skcraft/launcher/model/loader/LoaderSubResolver.java +++ b/launcher/src/main/java/com/skcraft/launcher/model/loader/LoaderSubResolver.java @@ -17,11 +17,11 @@ public class LoaderSubResolver implements Function { private final LoaderManifest loader; private final Environment env; private final Side side; - private final File baseDir; + private final File libraryDir; private final HashMap localFiles; public String getPathOf(String... rest) { - File file = baseDir; + File file = libraryDir; for (String part : rest) { file = new File(file, part); } @@ -49,9 +49,9 @@ public class LoaderSubResolver implements Function { String libraryName = arg.substring(1, bound); Library library = loader.findLibrary(libraryName); if (library != null) { - arg = getPathOf(manifest.getLibrariesLocation(), library.getPath(env)); + arg = getPathOf(library.getPath(env)); } else { - arg = getPathOf(manifest.getLibrariesLocation(), Library.mavenNameToPath(libraryName)); + arg = getPathOf(Library.mavenNameToPath(libraryName)); } } else if (start == '&' && end == '&') { String localFileName = arg.substring(1, bound);