Optimized fog removal ever so slightly
This commit is contained in:
@ -17,6 +17,8 @@ import static wtf.hak.survivalfabric.config.client.ClientConfigManager.getConfig
|
||||
@Mixin(value = BackgroundRenderer.class, priority = 910)
|
||||
public abstract class BackgroundRendererMixin {
|
||||
|
||||
private static final Fog EMPTY_FOG = new Fog(-8.0f, 1_000_000.0F, FogShape.CYLINDER, 0,0,0,0);
|
||||
|
||||
@Inject(method = "applyFog", at = @At("RETURN"), cancellable = true)
|
||||
private static void applyFog(Camera camera, BackgroundRenderer.FogType fogType, Vector4f color, float viewDistance, boolean thickenFog, float tickProgress, CallbackInfoReturnable<Fog> cir) {
|
||||
boolean renderFog = true;
|
||||
@ -37,6 +39,6 @@ public abstract class BackgroundRendererMixin {
|
||||
renderFog = false;
|
||||
|
||||
if(!renderFog)
|
||||
cir.setReturnValue(new Fog(-8.0f, 1_000_000.0F, FogShape.CYLINDER, 0,0,0,0));
|
||||
cir.setReturnValue(EMPTY_FOG);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user