diff --git a/common/src/main/java/net/irisshaders/iris/compat/sodium/mixin/CloudRendererAccessor.java b/common/src/main/java/net/irisshaders/iris/compat/sodium/mixin/CloudRendererAccessor.java index 40fd212335..b87da1fa4d 100644 --- a/common/src/main/java/net/irisshaders/iris/compat/sodium/mixin/CloudRendererAccessor.java +++ b/common/src/main/java/net/irisshaders/iris/compat/sodium/mixin/CloudRendererAccessor.java @@ -1,14 +1,15 @@ package net.irisshaders.iris.compat.sodium.mixin; import net.caffeinemc.mods.sodium.client.render.immediate.CloudRenderer; +import net.minecraft.client.renderer.ShaderProgram; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.gen.Accessor; // TODO: 1.21.2 @Mixin(CloudRenderer.class) public interface CloudRendererAccessor { - //@Accessor - //static ShaderProgram getCLOUDS_SHADER() { - // throw new IllegalStateException(); - //} + @Accessor + static ShaderProgram getCLOUDS_SHADER() { + throw new IllegalStateException(); + } } diff --git a/common/src/main/java/net/irisshaders/iris/mixin/MixinShaderManager_Overrides.java b/common/src/main/java/net/irisshaders/iris/mixin/MixinShaderManager_Overrides.java index 841da3b918..e10fea283b 100644 --- a/common/src/main/java/net/irisshaders/iris/mixin/MixinShaderManager_Overrides.java +++ b/common/src/main/java/net/irisshaders/iris/mixin/MixinShaderManager_Overrides.java @@ -4,6 +4,7 @@ import it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap; import net.caffeinemc.mods.sodium.client.render.immediate.CloudRenderer; import net.irisshaders.iris.Iris; +import net.irisshaders.iris.compat.sodium.mixin.CloudRendererAccessor; import net.irisshaders.iris.pathways.HandRenderer; import net.irisshaders.iris.pipeline.IrisRenderingPipeline; import net.irisshaders.iris.pipeline.WorldRenderingPhase; @@ -91,7 +92,7 @@ public abstract class MixinShaderManager_Overrides { coreShaderMap.put(CoreShaders.RENDERTYPE_WATER_MASK, p -> ShaderKey.ENTITIES_SOLID); coreShaderMap.put(CoreShaders.RENDERTYPE_CLOUDS, p -> ShaderKey.CLOUDS); coreShaderMap.put(CoreShaders.RENDERTYPE_CRUMBLING, p -> ShaderKey.CRUMBLING); - coreShaderMap.put(CloudRenderer.CLOUDS, p -> ShaderKey.CLOUDS_SODIUM); + coreShaderMap.put(CloudRendererAccessor.getCLOUDS_SHADER(), p -> ShaderKey.CLOUDS_SODIUM); coreShaderMap.put(CoreShaders.RENDERTYPE_TRANSLUCENT_MOVING_BLOCK, p -> ShaderKey.MOVING_BLOCK); coreShaderMapShadow.put(CoreShaders.POSITION, p -> ShaderKey.SHADOW_BASIC); @@ -140,7 +141,7 @@ public abstract class MixinShaderManager_Overrides { coreShaderMapShadow.put(CoreShaders.RENDERTYPE_WATER_MASK, p -> ShaderKey.SHADOW_ENTITIES_CUTOUT); coreShaderMapShadow.put(CoreShaders.RENDERTYPE_CLOUDS, p -> ShaderKey.SHADOW_CLOUDS); coreShaderMapShadow.put(CoreShaders.RENDERTYPE_CRUMBLING, p -> ShaderKey.SHADOW_BASIC); - coreShaderMapShadow.put(CloudRenderer.CLOUDS, p -> ShaderKey.SHADOW_CLOUDS); + coreShaderMapShadow.put(CloudRendererAccessor.getCLOUDS_SHADER(), p -> ShaderKey.SHADOW_CLOUDS); coreShaderMapShadow.put(CoreShaders.RENDERTYPE_TRANSLUCENT_MOVING_BLOCK, p -> ShaderKey.SHADOW_TERRAIN_CUTOUT); // Check that all shaders are accounted for