Fix auto update screen not appearing on MC 26.1.2
May also be necessary for old MC versions
This commit is contained in:
+7
-1
@@ -9,6 +9,7 @@ import com.seibel.distanthorizons.core.jar.installer.ModrinthGetter;
|
||||
import com.seibel.distanthorizons.core.jar.updater.SelfUpdater;
|
||||
import com.seibel.distanthorizons.core.logging.DhLogger;
|
||||
import com.seibel.distanthorizons.core.logging.DhLoggerBuilder;
|
||||
import com.seibel.distanthorizons.core.render.RenderThreadTaskHandler;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.IVersionConstants;
|
||||
import net.minecraft.client.Minecraft;
|
||||
#if MC_VER <= MC_1_12_2
|
||||
@@ -73,6 +74,10 @@ public class DhUpdateScreenBase
|
||||
}
|
||||
|
||||
|
||||
// running on the render thread is required since setting the MC screen may trigger
|
||||
// before its allowed, silently failing
|
||||
RenderThreadTaskHandler.INSTANCE.queueRunningOnRenderThread("Update Screen", () ->
|
||||
{
|
||||
try
|
||||
{
|
||||
#if MC_VER <= MC_1_12_2
|
||||
@@ -91,8 +96,9 @@ public class DhUpdateScreenBase
|
||||
{
|
||||
// info instead of error since this can be ignored and probably just means
|
||||
// there isn't a new DH version available
|
||||
LOGGER.info("Unable to show DH update screen, reason: ["+e.getMessage()+"].");
|
||||
LOGGER.error("Unable to show DH update screen, reason: ["+e.getMessage()+"].");
|
||||
}
|
||||
});
|
||||
};
|
||||
runnable.run();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user