Fix #5735 by pushing new build. Shutdown Forge eventbus when errors occur. Closes #5711

Also, improve logging so warnings, errors and fatals are always shown, regardless of marker.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
This commit is contained in:
cpw 2019-05-12 13:07:17 -04:00
parent 444ba7a7d5
commit 5cd82f16f2
No known key found for this signature in database
GPG Key ID: 8EB3DF749553B1B7
4 changed files with 7 additions and 2 deletions

View File

@ -148,12 +148,12 @@ public class ModLoader
private void dispatchAndHandleError(LifecycleEventProvider event) {
if (!loadingExceptions.isEmpty()) {
LOGGER.error("Skipping lifecycle event {}, {} errors found.", event, loadingExceptions.size());
LOGGER.error(LOADING,"Skipping lifecycle event {}, {} errors found.", event, loadingExceptions.size());
} else {
event.dispatch(this::accumulateErrors);
}
if (!loadingExceptions.isEmpty()) {
LOGGER.fatal("Failed to complete lifecycle event {}, {} errors found", event, loadingExceptions.size());
LOGGER.fatal(LOADING,"Failed to complete lifecycle event {}, {} errors found", event, loadingExceptions.size());
throw new LoadingFailedException(loadingExceptions);
}
}

View File

@ -28,6 +28,7 @@ import net.minecraft.resources.ResourcePackList;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.common.ForgeConfig;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.LoadingFailedException;
import net.minecraftforge.fml.LogicalSidedProvider;
import net.minecraftforge.fml.ModLoader;
@ -61,6 +62,7 @@ public class ClientModLoader
try {
ModLoader.get().loadMods();
} catch (LoadingFailedException e) {
MinecraftForge.EVENT_BUS.shutdown();
error = e;
}
ResourcePackLoader.loadResourcePacks(defaultResourcePacks);
@ -71,6 +73,7 @@ public class ClientModLoader
try {
ModLoader.get().finishMods();
} catch (LoadingFailedException e) {
MinecraftForge.EVENT_BUS.shutdown();
if (error == null) error = e;
}
loading = false;

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="warn" packages="net.minecrell.terminalconsole,net.minecrell.terminalconsole.util,com.mojang.util">
<filters>
<ThresholdFilter level="WARN" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="NETWORK_PACKETS" onMatch="${sys:forge.logging.marker.networking:-DENY}" onMismatch="NEUTRAL"/>
<MarkerFilter marker="CLASSLOADING" onMatch="${sys:forge.logging.marker.classloading:-DENY}" onMismatch="NEUTRAL"/>
<MarkerFilter marker="LAUNCHPLUGIN" onMatch="${sys:forge.logging.marker.launchplugin:-DENY}" onMismatch="NEUTRAL"/>

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="warn" packages="net.minecrell.terminalconsole,net.minecrell.terminalconsole.util,com.mojang.util">
<filters>
<ThresholdFilter level="WARN" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="NETWORK_PACKETS" onMatch="${sys:forge.logging.marker.networking:-DENY}" onMismatch="NEUTRAL"/>
<MarkerFilter marker="CLASSLOADING" onMatch="${sys:forge.logging.marker.classloading:-DENY}" onMismatch="NEUTRAL"/>
<MarkerFilter marker="LAUNCHPLUGIN" onMatch="${sys:forge.logging.marker.launchplugin:-DENY}" onMismatch="NEUTRAL"/>