Skip to content

Commit

Permalink
Fixed some fluid overlays
Browse files Browse the repository at this point in the history
  • Loading branch information
Asek3 committed Sep 21, 2023
1 parent acc48bc commit 5b1c57e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
import net.coderbot.iris.pipeline.WorldRenderingPipeline;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ScreenEffectRenderer;
import net.minecraft.resources.ResourceLocation;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(ScreenEffectRenderer.class)
public abstract class MixinScreenEffectRenderer {
@Inject(method = "renderWater", at = @At(value = "HEAD"), cancellable = true)
private static void iris$disableUnderWaterOverlayRendering(Minecraft minecraft, PoseStack poseStack, CallbackInfo ci) {
@Inject(method = "renderFluid", at = @At(value = "HEAD"), cancellable = true, remap = false)
private static void iris$disableUnderWaterOverlayRendering(Minecraft minecraft, PoseStack poseStack, ResourceLocation texture, CallbackInfo ci) {
WorldRenderingPipeline pipeline = Iris.getPipelineManager().getPipelineNullable();

if (pipeline != null && !pipeline.shouldRenderUnderwaterOverlay()) {
Expand Down

0 comments on commit 5b1c57e

Please sign in to comment.