2021-06-23 05:06:00 +02:00
|
|
|
package com.jozufozu.flywheel.mixin;
|
|
|
|
|
2021-06-30 21:43:54 +02:00
|
|
|
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;
|
2021-11-18 23:59:39 +01:00
|
|
|
import com.mojang.blaze3d.vertex.PoseStack;
|
|
|
|
import com.mojang.math.Matrix4f;
|
2021-06-23 05:06:00 +02:00
|
|
|
|
2021-09-15 08:45:29 +02:00
|
|
|
import net.minecraft.client.Camera;
|
2021-06-23 05:06:00 +02:00
|
|
|
import net.minecraft.client.renderer.GameRenderer;
|
2021-09-15 08:45:29 +02:00
|
|
|
import net.minecraft.client.renderer.LevelRenderer;
|
2021-11-18 23:59:39 +01:00
|
|
|
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)
|
2021-09-15 08:45:29 +02:00
|
|
|
@Mixin(LevelRenderer.class)
|
2021-06-23 05:06:00 +02:00
|
|
|
public class FixFabulousDepthMixin {
|
|
|
|
|
2021-09-15 23:28:44 +02:00
|
|
|
@Inject(method = "renderLevel", at = @At(value = "INVOKE", ordinal = 1, target = "Lnet/minecraft/client/renderer/PostChain;process(F)V"))
|
2021-09-15 08:45:29 +02:00
|
|
|
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
|
|
|
}
|
|
|
|
}
|