Skip to content

Commit e61b96b

Browse files
committed
Update 1.0.3
1 parent a3493dd commit e61b96b

File tree

6 files changed

+48
-5
lines changed

6 files changed

+48
-5
lines changed

betacraft/src/main/java/FoxLoader.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public void loadMainClass(URL[] url) {
5858
PrintStream errOrig = System.err;
5959
// Silence a normal thing to happen on launch.
6060
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
61-
PrintStream printStream = new PrintStream(byteArrayOutputStream);
61+
final PrintStream printStream = new PrintStream(byteArrayOutputStream);
6262
System.setErr(printStream);
6363
System.setOut(printStream);
6464
try {
@@ -70,8 +70,10 @@ public void loadMainClass(URL[] url) {
7070
System.setOut(outOrig);
7171
System.setErr(errOrig);
7272
} finally {
73-
System.setOut(outOrig);
74-
System.setErr(errOrig);
73+
if (System.out == printStream)
74+
System.setOut(outOrig);
75+
if (System.err == printStream)
76+
System.setErr(errOrig);
7577
}
7678
}
7779
}

common/src/main/java/com/fox2code/foxloader/launcher/LoggerHelper.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ final class LoggerHelper {
2020

2121
static boolean install(File logFile) {
2222
if (System.out.getClass() != PrintStream.class) {
23+
System.out.println("System out has been modified, skipping install.");
24+
try (PrintStream printStream = new PrintStream(Files.newOutputStream(logFile.toPath()))){
25+
new CantInstallLoggerHelperException( // Help with debugging
26+
"Failed to install LoggerHelper cause the current output class is " +
27+
System.out.getClass().getName()).printStackTrace(printStream);
28+
} catch (IOException ignored) {}
2329
// If System.out already has been replaced just ignore the replacement.
2430
return false;
2531
}
@@ -165,4 +171,10 @@ private static class SystemOutConsoleHandler extends ConsoleHandler {
165171
setLevel(Level.ALL);
166172
}
167173
}
174+
175+
private static class CantInstallLoggerHelperException extends Exception {
176+
CantInstallLoggerHelperException(String message) {
177+
super(message);
178+
}
179+
}
168180
}

common/src/main/java/com/fox2code/foxloader/loader/ModLoader.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ static void initializeModdedInstance(boolean client) {
8181
if (!coremods.exists() && !coremods.mkdirs())
8282
throw new RuntimeException("Cannot create coremods folder");
8383
modContainers.put(foxLoader.id, foxLoader);
84+
foxLoader.logger.info("Running FoxLoader " + BuildConfig.FOXLOADER_VERSION);
8485
if (TEST_MODE) {
8586
foxLoader.logger.info("Skipping mod loading because we are in test mode.");
8687
} else {

common/src/main/resources/assets/foxloader/lang/en_US.lang

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,31 @@ mods.updateAllMods=Update all mods
77
mods.updateMod=Update mod
88
mods.configureMod=Configure mod
99
mods.pack=Mods Pack
10+
11+
12+
# Installer strings (Note: Usable by mods too)
13+
installer.lang=English
14+
installer.for-reindev=For ReIndev %s
15+
installer.install-client=Install Client
16+
installer.install-special=Install on %s Launcher
17+
installer.install-minecraft=Install on Minecraft Launcher
18+
installer.install-betacraft=Install on BetaCraft Launcher
19+
installer.extract-multimc=Extract MultiMC Instance
20+
installer.exit-installer=Exit installer
21+
installer.install-server=Install Server
22+
installer.install-server.text.1=You can add "--server" argument to
23+
installer.install-server.text.2=the installer to run the server.
24+
installer.error.run-from-ide=Please run the compiled jar file to test the installation process
25+
installer.error.invalid-extension=Why the file is not a ".jar"??? TELL ME!!! WHY???
26+
installer.error.create-target-directory=Unable to create %s target directory!
27+
installer.error.not-reindev-client=Provided jar file is not a ReIndev client!
28+
installer.error.invalid-jar-file=Provided file is not a valid jar file!
29+
installer.success=FoxLoader %s for ReIndev %s has been successfully installed!
30+
installer.multimc.text.1=FoxLoader %s for ReIndev %s MMC Instance has been successfully extracted!
31+
installer.multimc.text.2=(The file should be a ".zip" next to the installer)
32+
installer.multimc.text.3=
33+
installer.multimc.text.4=To import a zip: Add Instance -> Import from zip -> Browse
34+
installer.multimc.text.5=You can also drag and drop the zip file onto your MMC main launcher GUI to create the new instance.
35+
installer.multimc.text.6=
36+
installer.multimc.text.7=MMM = MultiMC based launcher (MultiMC/PolyMC/PrismLauncher)
37+
installer.comment=(You can select the FoxLoader version you want to use in the version list)

final/src/main/resources/launcher-version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"assets": "pre-1.6",
1010
"complianceLevel": 0,
1111
"__note": "this is a hack to prevent legacy pojav launcher form crashing",
12-
"#hack_releaseTime#": "2022-08-17T22:11:56+00:00",
12+
"#hack_releaseTime#": "2017-09-18T08:39:46+00:00",
1313
"id": "#version#",
1414
"javaVersion": {
1515
"component": "jre-legacy",

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ org.gradle.parallel=true
33
org.gradle.jvmargs=-Xmx1024m -XX:-UseGCOverheadLimit -Dfile.encoding=UTF-8
44

55
# FoxLoader properties
6-
foxloader.version=1.0.2
6+
foxloader.version=1.0.3
77
foxloader.lastReIndevTransformerChanges=1.0.0
88

99
# ReIndev properties

0 commit comments

Comments
 (0)