public void drawWeather(float delta, ShapeRenderer shapeRenderer) {
        // set up OpenGL state for drawing weather
        GL11.glDisable(GL11.GL_CULL_FACE);
        GL11.glNormal3f(0F, 1F, 0F);
        GL11.glEnable(GL11.GL_BLEND);
        GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);

        float speed = 1F;
        if (minecraft.isRaining) {
            GL11.glBindTexture(GL11.GL_TEXTURE_2D, minecraft.textureManager.load(Textures.RAIN));
        } else if (minecraft.isSnowing) {
            GL11.glBindTexture(GL11.GL_TEXTURE_2D, minecraft.textureManager.load(Textures.SNOW));
            speed = 0.2F;
        }
        int playerX = (int) minecraft.player.x;
        int playerY = (int) minecraft.player.y;
        int playerZ = (int) minecraft.player.z;
        // Go through all tile columns within 5 blocks of the player
        for (int x = playerX - 5; x <= playerX + 5; ++x) {
            for (int z = playerZ - 5; z <= playerZ + 5; ++z) {
                int groundLevel = minecraft.level.getHighestTile(x, z);
                int lowestTile = playerY - 5;
                int highestTile = playerY + 5;

                if (lowestTile < groundLevel) {
                    lowestTile = groundLevel;
                }
                if (highestTile < groundLevel) {
                    highestTile = groundLevel;
                }
                if (lowestTile == highestTile) {
                    // No weather needs to be drawn for this column
                    continue;
                }

                float var74 = ((levelTicks + x * 3121 + z * 418711) % 32 + delta) / 32F * speed;
                float var124 = x + 0.5F - minecraft.player.x;
                float var35 = z + 0.5F - minecraft.player.z;
                float var92 = MathHelper.sqrt(var124 * var124 + var35 * var35) / 5;
                GL11.glColor4f(1F, 1F, 1F, (1F - var92 * var92) * 0.7F);
                shapeRenderer.begin();
                shapeRenderer.vertexUV(x, lowestTile, z, 0F,
                        lowestTile * 2F / 8F + var74 * 2F);
                shapeRenderer.vertexUV(x + 1, lowestTile, z + 1,
                        2F, lowestTile * 2F / 8F + var74 * 2F);
                shapeRenderer.vertexUV(x + 1, highestTile, z + 1,
                        2F, highestTile * 2F / 8F + var74 * 2F);
                shapeRenderer.vertexUV(x, highestTile, z,
                        0F, highestTile * 2F / 8F + var74 * 2F);
                shapeRenderer.vertexUV(x, lowestTile, z + 1,
                        0F, lowestTile * 2F / 8F + var74 * 2F);
                shapeRenderer.vertexUV(x + 1, lowestTile, z,
                        2F, lowestTile * 2F / 8F + var74 * 2F);
                shapeRenderer.vertexUV(x + 1, highestTile, z,
                        2F, highestTile * 2F / 8F + var74 * 2F);
                shapeRenderer.vertexUV(x, highestTile, z + 1,
                        0F, highestTile * 2F / 8F + var74 * 2F);
                shapeRenderer.end();
            }
        }

        // Restore OpenGL state after drawing weather
        GL11.glEnable(GL11.GL_CULL_FACE);
        GL11.glDisable(GL11.GL_BLEND);
    }