As of 1.8, assets are stored by hash, which makes it fiddly to listen to Minecraft's amazing ambient soundtrack outside the game.
This script can be used to copy music files to appopriately-named and organised .ogg
files for easier listening.
2. Save extract-music.js to your Minecraft assets
directory:
- Windows:
%AppData%\.minecraft\assets
- Linux:
~/.minecraft/assets
- OS X:
~/Library/Application Support/minecraft/assets
npm install fs-extra
node extract-music.js
You should see output similar to this, after which .ogg
files will be available in a new sounds/
directory:
./objects/87/87722a59c8d488370f3d430cd4c97a3161081785 -> ./sounds/music/menu/menu3.ogg
./objects/df/df1ff11b79757432c5c3f279e5ecde7b63ceda64 -> ./sounds/music/game/hal1.ogg
./objects/62/6254527d626a2c7d80901cc2e62dce3ba4bd81f6 -> ./sounds/music/game/creative/creative6.ogg
...
No changes need to be made since all music and sounds are extracted from the assets file, but it depends on what version you want to extract the music from, If you need it from a specific version of minecraft such as 1.7 just change the line with 1.12.json to 1.7.json or if you want the sounds from 1.8+ then substitute that for 1.12.json