vmax = 1 - interpolatedUVs[1][1];
float umin = interpolatedUVs[0][0];
float umax = interpolatedUVs[1][0];
Vector4f bottomGradient = colorGradients.get(gi);
Vector4f topGradient = colorGradients.get(gi+1);
<BUG>double camDist = Minecraft.getMinecraft().getRenderViewEntity().getDistance(segStopX, Minecraft.getMinecraft().getRenderViewEntity().posY, segStopZ);
double camDistNext = Minecraft.getMinecraft().getRenderViewEntity().getDistance(segStartX, Minecraft.getMinecraft().getRenderViewEntity().posY, segStartZ);
float alphaGradMultiplier = (float) (salphaGradMultiplier);</BUG>
float alphaGradMultiplierNext = (float) (salphaGradMultiplierNext);
float viewDist = Minecraft.getMinecraft().gameSettings.renderDistanceChunks * 16.0F - 10.0F;

vmax = 1 - interpolatedUVs[1][1];
float umin = interpolatedUVs[0][0];
float umax = interpolatedUVs[1][0];
Vector4f bottomGradient = colorGradients.get(gi);
Vector4f topGradient = colorGradients.get(gi+1);
Entity renderView = Minecraft.getMinecraft().getRenderViewEntity();
double camDist = renderView != null ? renderView.getDistance(segStopX, renderView.posY, segStopZ) : 0.0D;
double camDistNext = renderView != null ? renderView.getDistance(segStartX, renderView.posY, segStartZ) : 0.0D;
float alphaGradMultiplier = (float) (salphaGradMultiplier);
float alphaGradMultiplierNext = (float) (salphaGradMultiplierNext);
float viewDist = Minecraft.getMinecraft().gameSettings.renderDistanceChunks * 16.0F - 10.0F;
