From 6c8342b74e214c8014d4fa62c33463a3220b2a75 Mon Sep 17 00:00:00 2001 From: ichttt Date: Tue, 15 Oct 2019 23:59:41 +0200 Subject: [PATCH] Fixed loading error/warning screen not showing (#6218) --- .../net/minecraft/client/Minecraft.java.patch | 2 +- .../fml/client/ClientModLoader.java | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/patches/minecraft/net/minecraft/client/Minecraft.java.patch b/patches/minecraft/net/minecraft/client/Minecraft.java.patch index 7da7ffc85..2e3e9c84e 100644 --- a/patches/minecraft/net/minecraft/client/Minecraft.java.patch +++ b/patches/minecraft/net/minecraft/client/Minecraft.java.patch @@ -81,7 +81,7 @@ this.func_213256_aB(); } - -+ net.minecraftforge.fml.client.ClientModLoader.complete(); ++ if (net.minecraftforge.fml.client.ClientModLoader.completeModLoading()) return; // Do not overwrite the error sceen + // FORGE: Move opening initial screen to after startup and events are enabled. + // Also Fixes MC-145102 + if (this.field_71475_ae != null) { diff --git a/src/main/java/net/minecraftforge/fml/client/ClientModLoader.java b/src/main/java/net/minecraftforge/fml/client/ClientModLoader.java index d057f5b66..1a04a8103 100644 --- a/src/main/java/net/minecraftforge/fml/client/ClientModLoader.java +++ b/src/main/java/net/minecraftforge/fml/client/ClientModLoader.java @@ -142,7 +142,13 @@ public class ClientModLoader return VersionChecker.Status.UP_TO_DATE; } + @Deprecated // TODO: remove in 1.15 public static void complete() + { + completeModLoading(); + } + + public static boolean completeModLoading() { GlStateManager.disableTexture(); GlStateManager.enableTexture(); @@ -161,15 +167,17 @@ public class ClientModLoader } warnings = Collections.emptyList(); //Clear warnings, as the user does not want to see them } - if (error != null || !warnings.isEmpty()) { - mc.displayGuiScreen(new LoadingErrorScreen(error, warnings)); - } else { - ClientHooks.logMissingTextureErrors(); - } if (error == null) { // We can finally start the forge eventbus up MinecraftForge.EVENT_BUS.start(); } + if (error != null || !warnings.isEmpty()) { + mc.displayGuiScreen(new LoadingErrorScreen(error, warnings)); + return true; + } else { + ClientHooks.logMissingTextureErrors(); + return false; + } } public static void renderProgressText() {