diff --git a/coreSubProjects b/coreSubProjects index 9dbc5ef52..89804f1ba 160000 --- a/coreSubProjects +++ b/coreSubProjects @@ -1 +1 @@ -Subproject commit 9dbc5ef525bcf6efbf11ae9f903d5bd44c2c77bd +Subproject commit 89804f1ba1848e7a4c2e0c1a8f7ff9ef4c22c7f4 diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinSharedConstants.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinSharedConstants.java index 02ed096f4..b95804274 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinSharedConstants.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinSharedConstants.java @@ -1,5 +1,7 @@ package com.seibel.distanthorizons.fabric.mixins.client; +import com.seibel.distanthorizons.core.logging.DhLogger; +import com.seibel.distanthorizons.core.logging.DhLoggerBuilder; import com.seibel.distanthorizons.coreapi.ModInfo; import net.minecraft.SharedConstants; import org.spongepowered.asm.mixin.*; @@ -16,8 +18,34 @@ public abstract class MixinSharedConstants @Inject(method = "", at = @At("TAIL")) private static void setIsRunningInIde(CallbackInfo ci) { - // run extra validation for dev builds + DhLogger logger = new DhLoggerBuilder().name("SharedConstants").build(); + + // setting IS_RUNNING_IN_IDE to true enables + // additional validation on Mojang's side which + // helps catch errors when developing for Blaze3D + + boolean irisPresent; + #if MC_VER <= MC_1_21_11 IS_RUNNING_IN_IDE = ModInfo.IS_DEV_BUILD; + #else + try + { + // Iris has a bug for MC 26 and newer where it doesn't have + // a "sampler1" bound, causing a renderer crash if + // Blaze3D validation is enabled (which is enabled by if + // IS_RUNNING_IN_IDE is true) + ModInfo.class.getClassLoader().loadClass("net.irisshaders.iris.api.v0.IrisApi"); + irisPresent = true; + } + catch (ClassNotFoundException ignore) + { + irisPresent = false; + } + + IS_RUNNING_IN_IDE = ModInfo.IS_DEV_BUILD && !irisPresent; + #endif + + logger.info("Setting Minecraft's SharedConstants.IS_RUNNING_IN_IDE to ["+IS_RUNNING_IN_IDE+"]"); } } diff --git a/versionProperties/26.1.0.properties b/versionProperties/26.1.0.properties index 8a102a35d..04a4ca10f 100644 --- a/versionProperties/26.1.0.properties +++ b/versionProperties/26.1.0.properties @@ -26,10 +26,7 @@ bclib_version= immersive_portals_version= canvas_version= -# There is a bug on Iris' end where it fails to rebind "sampler1" -# causing a Blaze3D validation to fail, crashing the renderer. -# Unfortunately this bug doesn't appear to be fixable on DH's end. -fabric_incompatibility_list={ "iris": "*" } +fabric_incompatibility_list={ } fabric_recommend_list={} # Fabric mod run