mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
Исправление фикса для 1.12
This commit is contained in:
parent
a8bdebd767
commit
b6d0692a1e
4 changed files with 19 additions and 3 deletions
|
@ -16,6 +16,7 @@
|
||||||
-repackageclasses 'ru.gravit.launcher'
|
-repackageclasses 'ru.gravit.launcher'
|
||||||
-keep class ru.zaxar163.*
|
-keep class ru.zaxar163.*
|
||||||
-keep class cpw.mods.fml.*
|
-keep class cpw.mods.fml.*
|
||||||
|
-keep class net.minecraftforge.fml.*
|
||||||
-keepattributes SourceFile,LineNumberTable,*Annotation*
|
-keepattributes SourceFile,LineNumberTable,*Annotation*
|
||||||
-renamesourcefileattribute SourceFile
|
-renamesourcefileattribute SourceFile
|
||||||
-keepattributes Signature
|
-keepattributes Signature
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
package cpw.mods.fml;
|
||||||
|
// FMLSecurityManager запрещает делать System.exit из классов
|
||||||
|
// Не входящих в пакеты самого Forge
|
||||||
|
public class SafeExitJVMLegacy {
|
||||||
|
public static void exit(int code)
|
||||||
|
{
|
||||||
|
System.exit(code);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package cpw.mods.fml;
|
package net.minecraftforge.fml;
|
||||||
// FMLSecurityManager запрещает делать System.exit из классов
|
// FMLSecurityManager запрещает делать System.exit из классов
|
||||||
// Не входящих в пакеты самого Forge
|
// Не входящих в пакеты самого Forge
|
||||||
public class SafeExitJVM {
|
public class SafeExitJVM {
|
|
@ -15,7 +15,8 @@
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import cpw.mods.fml.SafeExitJVM;
|
import cpw.mods.fml.SafeExitJVMLegacy;
|
||||||
|
import net.minecraftforge.fml.SafeExitJVM;
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
import ru.gravit.launcher.LauncherAPI;
|
||||||
import ru.gravit.launcher.hasher.HashedEntry.Type;
|
import ru.gravit.launcher.hasher.HashedEntry.Type;
|
||||||
import ru.gravit.utils.helper.IOHelper;
|
import ru.gravit.utils.helper.IOHelper;
|
||||||
|
@ -67,7 +68,12 @@ public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) th
|
||||||
|
|
||||||
private static void handleError(Throwable e) {
|
private static void handleError(Throwable e) {
|
||||||
LogHelper.error(e);
|
LogHelper.error(e);
|
||||||
SafeExitJVM.exit(-123);
|
try {
|
||||||
|
SafeExitJVMLegacy.exit(-123);
|
||||||
|
} catch (Throwable ignored)
|
||||||
|
{
|
||||||
|
SafeExitJVM.exit(-123);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Deque<String> toPath(Iterable<Path> path) {
|
private static Deque<String> toPath(Iterable<Path> path) {
|
||||||
|
|
Loading…
Reference in a new issue