Skip to content
This repository was archived by the owner on Mar 29, 2022. It is now read-only.

Commit

Permalink
Build 236
Browse files Browse the repository at this point in the history
Fix Dumb Url Location Issues
  • Loading branch information
Tharow committed Feb 16, 2022
1 parent 70c40a9 commit fa2afcd
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 16 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<mainClass>${project.groupId}.${project.artifactId}.LauncherMain</mainClass>
<buildNumber>235</buildNumber>
<buildNumber>236</buildNumber>
<installer.encrypt>no</installer.encrypt>
<installer.password>tantalum</installer.password>
<installer.version>v5.1-230</installer.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ public void buildTasksQueue(InstallTasksQueue<? extends MojangVersion> queue, Re
}

if (!fmlLibsZip.isEmpty()) {
verifyingFiles.addTask(new EnsureFileTask<>(new File(directories.getCacheDirectory(), fmlLibsZip), new ValidZipFileVerifier(), modpackFmlLibDir, TantalumConstants.technicFmlLibRepo + fmlLibsZip, installingLibs, installingLibs));
verifyingFiles.addTask(new EnsureFileTask<>(new File(directories.getCacheDirectory(), fmlLibsZip), new ValidZipFileVerifier(), modpackFmlLibDir, TantalumConstants.FML_REPO_URL + fmlLibsZip, installingLibs, installingLibs));
}

if (!fmlLibs.isEmpty()) {
Expand All @@ -334,7 +334,7 @@ public void buildTasksQueue(InstallTasksQueue<? extends MojangVersion> queue, Re
File target = new File(modpackFmlLibDir, name);

if (!target.exists() || (verifier != null && !verifier.isFileValid(target)) ) {
verifyingFiles.addTask(new EnsureFileTask<>(cached, verifier, null, TantalumConstants.technicFmlLibRepo + name, installingLibs, installingLibs));
verifyingFiles.addTask(new EnsureFileTask<>(cached, verifier, null, TantalumConstants.FML_REPO_URL + name, installingLibs, installingLibs));
installingLibs.addTask(new CopyFileTask(cached, target));
}
});
Expand Down Expand Up @@ -411,7 +411,7 @@ public void buildTasksQueue(InstallTasksQueue<? extends MojangVersion> queue, Re
private MojangVersionBuilder createVersionBuilder(ModpackModel modpack, InstallTasksQueue<? extends MojangVersion> tasksQueue) {

ZipFileRetriever zipVersionRetriever = new ZipFileRetriever(new File(modpack.getBinDir(), "modpack.jar"));
HttpFileRetriever fallbackVersionRetriever = new HttpFileRetriever(TantalumConstants.technicVersions, tasksQueue.getDownloadListener());
HttpFileRetriever fallbackVersionRetriever = new HttpFileRetriever(TantalumConstants.VERSIONS_URL, tasksQueue.getDownloadListener());

ArrayList<MojangVersionRetriever> fallbackRetrievers = new ArrayList<>(1);
fallbackRetrievers.add(fallbackVersionRetriever);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,13 @@
package net.tharow.tantalum.launchercore;

import net.tharow.tantalum.autoupdate.IBuildNumber;
import net.tharow.tantalum.launchercore.exception.DownloadException;
import net.tharow.tantalum.utilslib.Utils;

import java.net.URL;

public class TantalumConstants {
public static final String MIRROR_URL = "https://raw.githubusercontent.com/Tharow-Services/Tantalum-Mirror/main/";
public static final String VERSIONS_URL = MIRROR_URL+ "version/";
public static final String MAVEN_URL = MIRROR_URL+ "maven/";
public static final String MC_REPO_URL = MAVEN_URL + "lib/";
public static final String FML_REPO_URL = MC_REPO_URL + "fml/";
public static final String FORGE_REPO_URL = MAVEN_URL + "lib/";
public static final String FML_REPO_URL = FORGE_REPO_URL + "fml/";
public static final String USER_AVATAR_URL = MIRROR_URL+ "assets/avatars/";
public static final String AVATAR_URL = USER_AVATAR_URL + "gravitar/";
public static final String UPDATE_URL = MIRROR_URL+ "stable4.json";
Expand All @@ -39,11 +35,11 @@ public class TantalumConstants {
public static final String TANTALUM_AUTH_PLATFORM_URL = TANTALUM_AUTH_URL + "platform/";

public static final String technicURL = MIRROR_URL;
public static final String technicVersions = "version/";
public static final String technicFmlLibRepo = technicURL + "lib/fml/";
public static final String technicForgeRepo = technicURL + "lib/";
//public static final String technicVersions = "version/";
//public static final String technicFmlLibRepo = technicURL + "lib/fml/";
//public static final String technicForgeRepo = technicURL + "lib/";

public static final String forgeMavenRepo = "https://files.minecraftforge.net/maven/";
public static final String forgeMavenRepo = MAVEN_URL;//"https://files.minecraftforge.net/maven/";
public static final String JAVA_RUNTIMES = MIRROR_URL+ "runtimes/all.json";
public static final String MINECRAFT_ASSETS = MIRROR_URL + "assets/objects/";
public static final String TRACKING_URL = "https://tantalum-auth.azurewebsites.net/tracking";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void runTask(InstallTasksQueue queue) throws IOException, InterruptedExce
if (isLegacy) {
Library legacyWrapper = new Library();
legacyWrapper.setName("net.tharow.tantalum:legacywrapper:1.2.1");
legacyWrapper.setUrl(TantalumConstants.technicForgeRepo);
legacyWrapper.setUrl(TantalumConstants.FORGE_REPO_URL);

version.addLibrary(legacyWrapper);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public String getDownloadUrl(String path) throws DownloadException {
// Check if this URL is in Minecraft Forge's Maven repo and add ours as a primary mirror
Matcher m = FORGE_MAVEN_ROOT.matcher(artifactUrl);
if (m.matches())
possibleUrls.add(TantalumConstants.technicForgeRepo + m.group(1));
possibleUrls.add(TantalumConstants.FORGE_REPO_URL + m.group(1));

possibleUrls.add(artifactUrl);
}
Expand Down

0 comments on commit fa2afcd

Please sign in to comment.