public TerrainTextureManager()
    {
        try
        {
            BufferedImage var1 = ImageIO.read(TerrainTextureManager.class.getResource("/terrain.png"));
            int[] var2 = new int[65536];
            var1.getRGB(0, 0, 256, 256, var2, 0, 256);

            for (int var3 = 0; var3 < 256; ++var3)
            {
                int var4 = 0;
                int var5 = 0;
                int var6 = 0;
                int var7 = var3 % 16 * 16;
                int var8 = var3 / 16 * 16;
                int var9 = 0;

                for (int var10 = 0; var10 < 16; ++var10)
                {
                    for (int var11 = 0; var11 < 16; ++var11)
                    {
                        int var12 = var2[var11 + var7 + (var10 + var8) * 256];
                        int var13 = var12 >> 24 & 255;

                        if (var13 > 128)
                        {
                            var4 += var12 >> 16 & 255;
                            var5 += var12 >> 8 & 255;
                            var6 += var12 & 255;
                            ++var9;
                        }
                    }

                    if (var9 == 0)
                    {
                        ++var9;
                    }

                    this.texCols[var3 * 3 + 0] = (float)(var4 / var9);
                    this.texCols[var3 * 3 + 1] = (float)(var5 / var9);
                    this.texCols[var3 * 3 + 2] = (float)(var6 / var9);
                }
            }
        }
        catch (IOException var14)
        {
            var14.printStackTrace();
        }

        for (int var15 = 0; var15 < 4096; ++var15)
        {
            if (Block.blocksList[var15] != null)
            {
                this.textures[var15 * 3 + 0] = Block.blocksList[var15].getBlockTextureFromSide(1);
                this.textures[var15 * 3 + 1] = Block.blocksList[var15].getBlockTextureFromSide(2);
                this.textures[var15 * 3 + 2] = Block.blocksList[var15].getBlockTextureFromSide(3);
            }
        }
    }