-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #129 from 3arthqu4ke/1.9.0
[1.9.0] Better Forge Support
- Loading branch information
Showing
14 changed files
with
100 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
project_version=1.8.1 | ||
project_version=1.9.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...mc-launcher/src/main/java/me/earth/headlessmc/launcher/command/forge/ForgeRepoFormat.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package me.earth.headlessmc.launcher.command.forge; | ||
|
||
public interface ForgeRepoFormat { | ||
// E.g. https://maven.neoforged.net/releases/net/neoforged/neoforge/20.4.195/neoforge-20.4.195-installer.jar | ||
String NEO_FORGE_URL = " https://maven.neoforged.net/releases/net/neoforged/neoforge/"; | ||
// E.g. https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.2-48.1.0/forge-1.20.2-48.1.0-installer.jar | ||
String LEX_FORGE_URL = "https://maven.minecraftforge.net/net/minecraftforge/forge/"; | ||
|
||
String getFileName(ForgeVersion version); | ||
|
||
String getUrl(String baseUrl, ForgeVersion version); | ||
|
||
static ForgeRepoFormat lexForge() { | ||
return new ForgeRepoFormat() { | ||
@Override | ||
public String getFileName(ForgeVersion version) { | ||
return "forge-" + version.getFullName() + "-installer.jar"; | ||
} | ||
|
||
@Override | ||
public String getUrl(String baseUrl, ForgeVersion version) { | ||
return baseUrl + version.getFullName() + "/" + getFileName(version); | ||
} | ||
}; | ||
} | ||
|
||
static ForgeRepoFormat neoForge() { | ||
return new ForgeRepoFormat() { | ||
@Override | ||
public String getFileName(ForgeVersion version) { | ||
return "neoforge-" + version.getName() + "-installer.jar"; | ||
} | ||
|
||
@Override | ||
public String getUrl(String baseUrl, ForgeVersion version) { | ||
return baseUrl + version.getName() + "/" + getFileName(version); | ||
} | ||
}; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/usr/bin/env sh | ||
java -jar headlessmc-launcher-1.8.1.jar --command $@ | ||
java -jar headlessmc-launcher-1.9.0.jar --command $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
@echo off | ||
"%JAVA_HOME%\bin\java" -jar headlessmc-launcher-1.8.1.jar --command %* | ||
"%JAVA_HOME%\bin\java" -jar headlessmc-launcher-1.9.0.jar --command %* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash | ||
# when running in docker on windows bash seems to be at /bin/bash TODO: can we make this one script? | ||
java -jar headlessmc-launcher-1.8.1.jar --command $@ | ||
java -jar headlessmc-launcher-1.9.0.jar --command $@ |