Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,44 @@ Usage: mc-image-helper patch [-h] [--patch-env-prefix=<envPrefix>] FILE_OR_DIR

[See below](#patch-schemas) for a description of [PatchSet](#patchset) and [PatchDefinition](#patchdefinition) JSON schemas.

### install-quilt

```
Usage: mc-image-helper install-quilt [-h] [--force-reinstall]
[--loader-version=VERSION]
[--minecraft-version=VERSION]
[--output-directory=DIR]
[--repo-url=<repoUrl>]
[--results-file=FILE] [--installer-url=URL
| --installer-version=VERSION]
[[--tls-handshake-timeout=DURATION]
[--connection-pool-max-idle-timeout=DURATIO
N] [--http-response-timeout=DURATION]]
Installs Quilt mod loader
--connection-pool-max-idle-timeout=DURATION

--force-reinstall
-h, --help
--http-response-timeout=DURATION
The response timeout to apply to HTTP operations.
Parsed from ISO-8601 format. Default: PT30S
--installer-url=URL
--installer-version=VERSION
Default uses latest
--loader-version=VERSION
Default uses latest
--minecraft-version=VERSION
'latest', 'snapshot', or specific version
--output-directory=DIR
--repo-url=<repoUrl> Default: https://maven.quiltmc.
org/repository/release
--results-file=FILE A key=value file suitable for scripted environment
variables. Currently includes
SERVER: the entry point jar or script
--tls-handshake-timeout=DURATION
Default: PT30S
```

### sync-and-interpolate

```
Expand Down
2 changes: 2 additions & 0 deletions dev/paper.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
###
GET https://api.papermc.io/v2/projects/paper
56 changes: 27 additions & 29 deletions src/main/java/me/itzg/helpers/curseforge/CurseForgeInstaller.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
package me.itzg.helpers.curseforge;

import static java.util.Collections.emptySet;
import static java.util.Objects.requireNonNull;
import static java.util.Optional.ofNullable;
import static me.itzg.helpers.singles.MoreCollections.safeStreamFrom;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
Expand All @@ -26,30 +49,6 @@
import reactor.core.publisher.Mono;
import reactor.core.scheduler.Schedulers;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;

import static java.util.Collections.emptySet;
import static java.util.Objects.requireNonNull;
import static java.util.Optional.ofNullable;
import static me.itzg.helpers.singles.MoreCollections.safeStreamFrom;

@RequiredArgsConstructor
@Slf4j
public class CurseForgeInstaller {
Expand Down Expand Up @@ -385,7 +384,6 @@ private void finalizeExistingInstallation(CurseForgeManifest prevManifest) throw
if (prevManifest.getLevelName() != null) {
resultsFileWriter.write("LEVEL", prevManifest.getLevelName());
}
resultsFileWriter.write("VERSION", prevManifest.getMinecraftVersion());
}
}
}
Expand Down Expand Up @@ -413,7 +411,6 @@ private void finalizeResults(InstallContext context, ModPackResults results, int
if (results.getLevelName() != null) {
resultsFileWriter.write("LEVEL", results.getLevelName());
}
resultsFileWriter.write("VERSION", results.getMinecraftVersion());
}
}
}
Expand Down Expand Up @@ -841,7 +838,7 @@ private boolean isServerMod(CurseForgeFile file) {
return !client;
}

private void prepareModLoader(String id, String minecraftVersion) throws IOException {
private void prepareModLoader(String id, String minecraftVersion) {
final String[] parts = id.split("-", 2);
if (parts.length != 2) {
throw new GenericException("Unknown modloader ID: " + id);
Expand All @@ -858,8 +855,9 @@ private void prepareModLoader(String id, String minecraftVersion) throws IOExcep
}
}

private void prepareFabric(String minecraftVersion, String loaderVersion) throws IOException {
final FabricLauncherInstaller installer = new FabricLauncherInstaller(outputDir, resultsFile);
private void prepareFabric(String minecraftVersion, String loaderVersion) {
final FabricLauncherInstaller installer = new FabricLauncherInstaller(outputDir)
.setResultsFile(resultsFile);
installer.installUsingVersions(minecraftVersion, loaderVersion, null);
}

Expand Down
Loading