1. Download a version of OptiFine you want and install

    https://optifine.net/downloads

  2. Run Minecraft with OptiFine profile

  3. Use CMM resource pack