diff --git a/build.gradle b/build.gradle index bb76ce0..172480c 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ buildscript { } apply plugin: 'net.minecraftforge.gradle' -version = '1.0.3' +version = '1.0.4' group = 'me.xfl03' archivesBaseName = 'MoreCrashInfo' diff --git a/src/main/java/me/xfl03/morecrashinfo/MoreCrashInfo.java b/src/main/java/me/xfl03/morecrashinfo/MoreCrashInfo.java index 2bf98f8..b3ddcaf 100644 --- a/src/main/java/me/xfl03/morecrashinfo/MoreCrashInfo.java +++ b/src/main/java/me/xfl03/morecrashinfo/MoreCrashInfo.java @@ -29,11 +29,6 @@ private void setup(final FMLCommonSetupEvent event) { LOGGER.debug("MoreCrashInfo: PreInit Begin."); - CrashReportExtender.registerCrashCallable(new ModList()); - CrashReportExtender.registerCrashCallable(new CoreModList()); - - CrashHandler.registerHandler(VerifyError.class, VerifyErrorHandler::new); - LOGGER.debug("MoreCrashInfo: PreInit End."); } diff --git a/src/main/java/me/xfl03/morecrashinfo/handler/CrashHandler.java b/src/main/java/me/xfl03/morecrashinfo/handler/CrashHandler.java index fd18a87..878ef3f 100644 --- a/src/main/java/me/xfl03/morecrashinfo/handler/CrashHandler.java +++ b/src/main/java/me/xfl03/morecrashinfo/handler/CrashHandler.java @@ -1,15 +1,25 @@ package me.xfl03.morecrashinfo.handler; import cpw.mods.modlauncher.log.TransformingThrowablePatternConverter; +import me.xfl03.morecrashinfo.crash.CoreModList; +import me.xfl03.morecrashinfo.crash.ModList; import me.xfl03.morecrashinfo.handler.exception.*; import net.minecraft.crash.CrashReport; +import net.minecraftforge.fml.CrashReportExtender; import java.util.*; import java.util.function.Function; public class CrashHandler { - private static Map> handlers = new HashMap<>(); + + static { + CrashHandler.registerHandler(VerifyError.class, VerifyErrorHandler::new); + + CrashReportExtender.registerCrashCallable(new ModList()); + CrashReportExtender.registerCrashCallable(new CoreModList()); + } + private static ExceptionHandler handler; public static void registerHandler(Class exception, Function handler) { diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 8bd94ec..d190f32 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -3,7 +3,7 @@ loaderVersion="[25,)" issueTrackerURL="http://github.com/xfl03/MoreCrashInfo/issues" [[mods]] modId="morecrashinfo" -version="1.0.3" +version="1.0.4" displayName="MoreCrashInfo" displayURL="http://github.com/xfl03/MoreCrashInfo" credits=""