Add fabulous depth fix

This commit is contained in:
JozsefA 2021-06-22 20:06:00 -07:00
parent 327aefe5ea
commit 12748cc208
2 changed files with 49 additions and 22 deletions

View file

@ -0,0 +1,27 @@
package com.jozufozu.flywheel.mixin;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.ActiveRenderInfo;
import net.minecraft.client.renderer.GameRenderer;
import net.minecraft.client.renderer.LightTexture;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.util.math.vector.Matrix4f;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
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;
@OnlyIn(Dist.CLIENT)
@Mixin(WorldRenderer.class)
public class FixFabulousDepthMixin {
@Inject(method = "render", at = @At(value = "INVOKE", ordinal = 1, target = "Lnet/minecraft/client/shader/ShaderGroup;render(F)V"))
private void disableTransparencyShaderDepth(MatrixStack p_228426_1_, float p_228426_2_, long p_228426_3_, boolean p_228426_5_, ActiveRenderInfo p_228426_6_, GameRenderer p_228426_7_, LightTexture p_228426_8_, Matrix4f p_228426_9_, CallbackInfo ci) {
GlStateManager.depthMask(false);
}
}

View file

@ -1,24 +1,24 @@
{
"required": true,
"minVersion": "0.8",
"package": "com.jozufozu.flywheel.mixin",
"compatibilityLevel": "JAVA_8",
"refmap": "flywheel.refmap.json",
"mixins": [
],
"client": [
"CancelEntityRenderMixin",
"CancelTileEntityRenderMixin",
"FogColorTrackerMixin",
"RenderHooksMixin",
"ShaderCloseMixin",
"StoreProjectionMatrixMixin",
"TileRemoveMixin",
"TileWorldHookMixin",
"light.LightUpdateMixin",
"light.NetworkLightUpdateMixin"
],
"injectors": {
"defaultRequire": 1
}
"required": true,
"minVersion": "0.8",
"package": "com.jozufozu.flywheel.mixin",
"compatibilityLevel": "JAVA_8",
"refmap": "flywheel.refmap.json",
"mixins": [],
"client": [
"CancelEntityRenderMixin",
"CancelTileEntityRenderMixin",
"FixFabulousDepthMixin",
"FogColorTrackerMixin",
"RenderHooksMixin",
"ShaderCloseMixin",
"StoreProjectionMatrixMixin",
"TileRemoveMixin",
"TileWorldHookMixin",
"light.LightUpdateMixin",
"light.NetworkLightUpdateMixin"
],
"injectors": {
"defaultRequire": 1
}
}