Fog rendering fixes
This commit is contained in:
parent
4cbf429bc5
commit
de7c7e1cdb
2 changed files with 9 additions and 7 deletions
|
@ -35,7 +35,6 @@ public class BackgroundRendererMixin {
|
||||||
//private static final float SKY_RED = 21F / 255F;
|
//private static final float SKY_RED = 21F / 255F;
|
||||||
//private static final float SKY_GREEN = 16F / 255F;
|
//private static final float SKY_GREEN = 16F / 255F;
|
||||||
//private static final float SKY_BLUE = 20F / 255F;
|
//private static final float SKY_BLUE = 20F / 255F;
|
||||||
private static final float NORMAL = 1.5F/ 0.12757292F; // 0.12757292F is max value for red channel after all transformations
|
|
||||||
|
|
||||||
@Shadow
|
@Shadow
|
||||||
private static float red;
|
private static float red;
|
||||||
|
@ -59,9 +58,9 @@ public class BackgroundRendererMixin {
|
||||||
}
|
}
|
||||||
if (!skip) {
|
if (!skip) {
|
||||||
//RenderSystem.clearColor(SKY_RED, SKY_GREEN, SKY_BLUE, 0);
|
//RenderSystem.clearColor(SKY_RED, SKY_GREEN, SKY_BLUE, 0);
|
||||||
red *= NORMAL;
|
red *= 4;
|
||||||
green *= NORMAL;
|
green *= 4;
|
||||||
blue *= NORMAL;
|
blue *= 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,10 +119,13 @@ public class EndLakeFeature extends DefaultFeature {
|
||||||
if (world.getBlockState(POS).getMaterial().isReplaceable()) {
|
if (world.getBlockState(POS).getMaterial().isReplaceable()) {
|
||||||
if (world.isAir(POS.up())) {
|
if (world.isAir(POS.up())) {
|
||||||
BlockState state = world.getBiome(POS).getGenerationSettings().getSurfaceConfig().getTopMaterial();
|
BlockState state = world.getBiome(POS).getGenerationSettings().getSurfaceConfig().getTopMaterial();
|
||||||
BlocksHelper.setWithoutUpdate(world, POS, state);
|
BlocksHelper.setWithoutUpdate(world, POS, random.nextBoolean() ? state : BlockRegistry.ENDSTONE_DUST.getDefaultState());
|
||||||
|
BlocksHelper.setWithoutUpdate(world, POS.down(), END_STONE);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
BlocksHelper.setWithoutUpdate(world, POS, BlockRegistry.ENDSTONE_DUST.getDefaultState());
|
||||||
|
BlocksHelper.setWithoutUpdate(world, POS.down(), END_STONE);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
BlocksHelper.setWithoutUpdate(world, POS, END_STONE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue