Fix sky colour blending not working for render distances >16 (#3476)

This commit is contained in:
Ben Staddon 2016-12-02 02:49:34 +00:00 committed by LexManos
parent 0b9988bf45
commit 14f3120eed

View file

@ -261,9 +261,9 @@ public class ForgeHooksClient
GameSettings settings = Minecraft.getMinecraft().gameSettings;
int[] ranges = ForgeModContainer.blendRanges;
int distance = 0;
if (settings.fancyGraphics && settings.renderDistanceChunks >= 0 && settings.renderDistanceChunks < ranges.length)
if (settings.fancyGraphics && ranges.length > 0)
{
distance = ranges[settings.renderDistanceChunks];
distance = ranges[MathHelper.clamp_int(settings.renderDistanceChunks, 0, ranges.length-1)];
}
int r = 0;