From d750e489df3ef762291571986aa7872b486d1fff Mon Sep 17 00:00:00 2001 From: s809 <43530948+s809@users.noreply.github.com> Date: Sun, 19 Apr 2026 12:57:23 +0500 Subject: [PATCH] Auto-change rendering backend when Iris is present --- .../common/AbstractModInitializer.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/common/src/main/java/com/seibel/distanthorizons/common/AbstractModInitializer.java b/common/src/main/java/com/seibel/distanthorizons/common/AbstractModInitializer.java index 5f4413589..524dc1f2d 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/AbstractModInitializer.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/AbstractModInitializer.java @@ -376,14 +376,11 @@ public abstract class AbstractModInitializer // Iris only supports native OpenGL if (renderApi != EDhApiRenderApi.OPEN_GL) { - String irisUnsupportedMessage = "Iris doesn't support DH when using the ["+EDhApiRenderApi.BLAZE_3D+"] rendering API, this will need to be fixed on Iris end. As a temporary fix please change the rendering API to ["+EDhApiRenderApi.OPEN_GL+"] in the DH config file."; - LOGGER.fatal(irisUnsupportedMessage); - NativeDialogUtil.showDialog(ModInfo.READABLE_NAME, irisUnsupportedMessage, "ok", "error"); + String irisUnsupportedMessage = "Iris does not support DH when using the [" + EDhApiRenderApi.BLAZE_3D + "] rendering API, this will need to be fixed on Iris end.\nRendering API will be auto-changed to [" + EDhApiRenderApi.OPEN_GL + "]."; + LOGGER.error(irisUnsupportedMessage); + NativeDialogUtil.showDialog(ModInfo.READABLE_NAME, irisUnsupportedMessage, "ok", "warning"); - IMinecraftClientWrapper mc = SingletonInjector.INSTANCE.get(IMinecraftClientWrapper.class); - String errorMessage = "loading Distant Horizons. "+irisUnsupportedMessage; - String exceptionError = "Distant Horizons conditional mod config Exception"; - mc.crashMinecraft(errorMessage, new Exception(exceptionError)); + Config.Client.Advanced.Graphics.Experimental.renderingApi.set(EDhApiRenderApi.OPEN_GL); } }