Fog rendering skip
This commit is contained in:
parent
992d755801
commit
cbff862594
1 changed files with 8 additions and 0 deletions
|
@ -63,6 +63,9 @@ public class BackgroundRendererMixin {
|
|||
Entity entity = camera.getEntity();
|
||||
FogType fogType = camera.getFluidInCamera();
|
||||
if (fogType != FogType.WATER) {
|
||||
if (bcl_shouldIgnore(entity.level, (int) entity.getX(), (int) entity.getEyeY(), (int) entity.getZ())) {
|
||||
return;
|
||||
}
|
||||
float fog = bcl_getFogDensity(entity.level, entity.getX(), entity.getEyeY(), entity.getZ());
|
||||
BackgroundInfo.fogDensity = fog;
|
||||
float start = viewDistance * 0.75F / fog;
|
||||
|
@ -96,6 +99,11 @@ public class BackgroundRendererMixin {
|
|||
}
|
||||
}
|
||||
|
||||
private static boolean bcl_shouldIgnore(Level level, int x, int y, int z) {
|
||||
Biome biome = level.getBiome(BCL_MUT_POS.set(x, y, z));
|
||||
return BiomeAPI.getRenderBiome(biome) == BiomeAPI.EMPTY_BIOME;
|
||||
}
|
||||
|
||||
private static float bcl_getFogDensityI(Level level, int x, int y, int z) {
|
||||
Biome biome = level.getBiome(BCL_MUT_POS.set(x, y, z));
|
||||
BCLBiome renderBiome = BiomeAPI.getRenderBiome(biome);
|
||||
|
|
Loading…
Reference in a new issue