Larger start fog distance

This commit is contained in:
paulevsGitch 2021-12-23 21:08:18 +03:00
parent 6c18b1e842
commit 9737493069
2 changed files with 4 additions and 4 deletions

View file

@ -17,7 +17,7 @@ import ru.bclib.util.BackgroundInfo;
import ru.bclib.util.MHelper;
import ru.bclib.world.biomes.BCLBiome;
public class CustomBackgroundRenderer {
public class CustomFogRenderer {
private static final MutableBlockPos LAST_POS = new MutableBlockPos(0, -100, 0);
private static final MutableBlockPos MUT_POS = new MutableBlockPos();
private static final float[] FOG_DENSITY = new float[8];
@ -46,7 +46,7 @@ public class CustomBackgroundRenderer {
fogEnd = Math.min(viewDistance, 192.0F) * 0.5F / fog;
}
else {
fogStart = 0;//viewDistance * 0.75F / fog;
fogStart = viewDistance * 0.25F / fog; // In vanilla - 0
fogEnd = viewDistance / fog;
}

View file

@ -14,7 +14,7 @@ import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import ru.bclib.client.render.CustomBackgroundRenderer;
import ru.bclib.client.render.CustomFogRenderer;
import ru.bclib.util.BackgroundInfo;
@Mixin(FogRenderer.class)
@ -50,7 +50,7 @@ public class FogRendererMixin {
@Inject(method = "setupFog", at = @At("HEAD"), cancellable = true)
private static void bclib_fogDensity(Camera camera, FogRenderer.FogMode fogMode, float viewDistance, boolean thickFog, CallbackInfo info) {
if (CustomBackgroundRenderer.applyFogDensity(camera, fogMode, viewDistance, thickFog)) {
if (CustomFogRenderer.applyFogDensity(camera, fogMode, viewDistance, thickFog)) {
info.cancel();
}
}