Fix forge vanilla fog removal

This commit is contained in:
James Seibel
2023-08-06 19:11:09 -05:00
parent b0c1f69023
commit 879c70a7a0
@@ -50,7 +50,7 @@ public class MixinFogRenderer {
@Inject(at = @At("RETURN"),
method = "setupFog(Lnet/minecraft/client/Camera;Lnet/minecraft/client/renderer/FogRenderer$FogMode;FZF)V",
remap = #if MC_1_16_5 || POST_AND_MC_1_19_2 true #else false #endif) // Remap messiness due to this being added by forge.
remap = true)
private static void disableSetupFog(Camera camera, FogMode fogMode, float f, boolean bl, float partTick, CallbackInfo callback)
{
#if PRE_MC_1_17_1
@@ -60,7 +60,8 @@ public class MixinFogRenderer {
FogType fogTypes = camera.getFluidInCamera();
boolean cameraNotInFluid = fogTypes == FogType.NONE;
#endif
Entity entity = camera.getEntity();
boolean isSpecialFog = (entity instanceof LivingEntity) && ((LivingEntity) entity).hasEffect(MobEffects.BLINDNESS);
if (!isSpecialFog && cameraNotInFluid && fogMode == FogMode.FOG_TERRAIN