Skip to content

Commit 435dece

Browse files
committed
refactor(installer): simplify Minecraft jar handling by removing remapping logic
Since Minecraft is no longer obfuscated, we can just download the bundle and extract.
1 parent b8bea0e commit 435dece

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

vanilla/src/installer/java/org/spongepowered/vanilla/installer/InstallerMain.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
import java.io.IOException;
4848
import java.io.InputStream;
4949
import java.io.InputStreamReader;
50-
import java.io.UncheckedIOException;
5150
import java.net.URI;
5251
import java.net.URL;
5352
import java.net.URLConnection;
@@ -116,18 +115,10 @@ private void downloadAndRun() throws Exception {
116115
final LibraryManager libraryManager = this.installer.getLibraryManager();
117116
try {
118117
if (mcVersion != null) {
119-
final CompletableFuture<Path> mappingsFuture = this.downloadMappings(mcVersion);
120118
final CompletableFuture<Path> originalMcFuture = this.downloadMinecraft(mcVersion);
121119
final CompletableFuture<ServerAndLibraries> extractedFuture = originalMcFuture
122120
.thenApplyAsync(this::extractBundle, libraryManager.preparationWorker());
123-
final CompletableFuture<ServerAndLibraries> remappedMinecraftJarFuture = mappingsFuture.thenCombineAsync(extractedFuture, (mappings, minecraft) -> {
124-
try {
125-
return this.remapMinecraft(minecraft, mappings);
126-
} catch (final IOException ex) {
127-
throw new UncheckedIOException(ex);
128-
}
129-
}, libraryManager.preparationWorker());
130-
remappedMinecraftJar = remappedMinecraftJarFuture.get();
121+
remappedMinecraftJar = extractedFuture.get();
131122
}
132123
} catch (final ExecutionException ex) {
133124
final /* @Nullable */ Throwable cause = ex.getCause();

0 commit comments

Comments
 (0)