Flywheel/src/main/java/com/jozufozu/flywheel/mixin/FixFabulousDepthMixin.java

28 lines
1.1 KiB
Java
Raw Normal View History

2021-06-23 05:06:00 +02:00
package com.jozufozu.flywheel.mixin;
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;
2021-06-23 05:06:00 +02:00
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Matrix4f;
2021-06-23 05:06:00 +02:00
import net.minecraft.client.Camera;
2021-06-23 05:06:00 +02:00
import net.minecraft.client.renderer.GameRenderer;
import net.minecraft.client.renderer.LevelRenderer;
import net.minecraft.client.renderer.LightTexture;
2021-06-23 05:06:00 +02:00
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@OnlyIn(Dist.CLIENT)
@Mixin(LevelRenderer.class)
2021-06-23 05:06:00 +02:00
public class FixFabulousDepthMixin {
@Inject(method = "renderLevel", at = @At(value = "INVOKE", ordinal = 1, target = "Lnet/minecraft/client/renderer/PostChain;process(F)V"))
private void disableTransparencyShaderDepth(PoseStack p_228426_1_, float p_228426_2_, long p_228426_3_, boolean p_228426_5_, Camera p_228426_6_, GameRenderer p_228426_7_, LightTexture p_228426_8_, Matrix4f p_228426_9_, CallbackInfo ci) {
2021-07-15 20:36:24 +02:00
GlStateManager._depthMask(false);
2021-06-23 05:06:00 +02:00
}
}