Skip to content

Commit

Permalink
Randomize modpack download list
Browse files Browse the repository at this point in the history
  • Loading branch information
Skidamek committed Nov 29, 2024
1 parent 1c6ba76 commit ed8afd2
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ public void ModpackUpdaterMain(String link, Path modpackDir, Path modpackContent
new ScreenManager().download(downloadManager, ModpackUpdater.getModpackName());

if (wholeQueue > 0) {
for (var item : serverModpackContent.list) {
var randomizedList = new LinkedList<>(serverModpackContent.list);
Collections.shuffle(randomizedList);
for (var item : randomizedList) {

String fileName = item.file;
String serverSHA1 = item.sha1;
Expand Down Expand Up @@ -298,7 +300,9 @@ public void ModpackUpdaterMain(String link, Path modpackDir, Path modpackContent

// TODO try to fetch again from modrinth and curseforge

for (var item : refreshedFilteredList) {
var randomizedList = new LinkedList<>(refreshedFilteredList);
Collections.shuffle(randomizedList);
for (var item : randomizedList) {
String fileName = item.file;
String serverSHA1 = item.sha1;

Expand Down

0 comments on commit ed8afd2

Please sign in to comment.