Force enable fog if MC is rendering fog

Done to fix underwater/blindness rendering
This commit is contained in:
James Seibel
2026-02-14 08:24:44 -06:00
parent db378d64b0
commit d14349383b
4 changed files with 34 additions and 1 deletions
@@ -19,6 +19,7 @@
package com.seibel.distanthorizons.fabric.mixins.client;
import com.seibel.distanthorizons.core.api.internal.ClientApi;
import com.seibel.distanthorizons.core.config.Config;
import com.seibel.distanthorizons.core.dependencyInjection.SingletonInjector;
import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftRenderWrapper;
@@ -114,6 +115,12 @@ public class MixinFogRenderer
callback.setReturnValue(FogParameters.NO_FOG);
#else
#endif
ClientApi.RENDER_STATE.vanillaFogEnabled = false;
}
else
{
ClientApi.RENDER_STATE.vanillaFogEnabled = true;
}
}
@@ -142,6 +149,12 @@ public class MixinFogRenderer
instance.renderDistanceStart = A_REALLY_REALLY_BIG_VALUE;
instance.renderDistanceEnd = A_EVEN_LARGER_VALUE;
ClientApi.RENDER_STATE.vanillaFogEnabled = false;
}
else
{
ClientApi.RENDER_STATE.vanillaFogEnabled = true;
}
// Always call the original with the modified or original value