remove Iris incompatibility and disable validation when present
This commit is contained in:
+1
-1
Submodule coreSubProjects updated: 9dbc5ef525...89804f1ba1
+29
-1
@@ -1,5 +1,7 @@
|
|||||||
package com.seibel.distanthorizons.fabric.mixins.client;
|
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 com.seibel.distanthorizons.coreapi.ModInfo;
|
||||||
import net.minecraft.SharedConstants;
|
import net.minecraft.SharedConstants;
|
||||||
import org.spongepowered.asm.mixin.*;
|
import org.spongepowered.asm.mixin.*;
|
||||||
@@ -16,8 +18,34 @@ public abstract class MixinSharedConstants
|
|||||||
@Inject(method = "<clinit>", at = @At("TAIL"))
|
@Inject(method = "<clinit>", at = @At("TAIL"))
|
||||||
private static void setIsRunningInIde(CallbackInfo ci)
|
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;
|
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+"]");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,10 +26,7 @@ bclib_version=
|
|||||||
immersive_portals_version=
|
immersive_portals_version=
|
||||||
canvas_version=
|
canvas_version=
|
||||||
|
|
||||||
# There is a bug on Iris' end where it fails to rebind "sampler1"
|
fabric_incompatibility_list={ }
|
||||||
# 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_recommend_list={}
|
fabric_recommend_list={}
|
||||||
|
|
||||||
# Fabric mod run
|
# Fabric mod run
|
||||||
|
|||||||
Reference in New Issue
Block a user