Changing the former icon is relatively straightforward.
- Find any application whose icon you wish to borrow
- Right-click the file and select "Show Package Contents"
- Navigate to Contents/Resources/favicon.icns
- View the file's info (either right-click and choose "Get Info" or hit Command-I on the keyboard)
- Select the icon at the very top-left corner of the Info window, and it highlights slightly.
- Copy it with Command-C or Edit->Copy. This copies the icon's picture, not the file itself.
- Now, navigate to /Applications/Minecraft.app and repeat steps 2-5. You should have the Minecraft icon highlighted.
- Paste with Command-V (or Edit->Paste)
This changes the preloader/launcher icon so any time you open it, a different icon than the standard Minecraft icon is shown.
As an aside, you could also hide this Dock icon entirely when it is running. To do this, locate the Info.plist file at:
/Applications/Minecraft.app/Contents/Info.plist
Add this line somewhere about halfway down:
<key>LSUIElement</key><string>1</string>
This hides the Dock icon when the application is running.
The second Minecraft icon is embedded within your personal ~/Library folder. The file on my system is located at:
~/Library/Application Support/minecraft/assets/objects/99/991b421dfd401f115241601b2b373140a8d78572
This 991b421...572 file has no extension and appears to have a nondescript icon when viewed in Finder. However, if you select the file in Finder and hit Space to show a larger preview, it expands to show a picture of the Minecraft icon.
This file is actually named according to its SHA1 digest: Its file size is exactly 114,786 bytes, and it is in the '/objects/99/' directory because the first two digits of its name start with '99'. (Knowing all this is important for the next steps.)
This 991b..8572 number is referenced within a JSON file located in:
~/Library/Application Support/minecraft/assets/indexes/
At the time of this writing, 1.7.4 is out, so the file is called
~/Library/Application Support/minecraft/assets/indexes/1.7.4.json
A few entries down, you will see the lines:
"icons/minecraft.icns": {
"hash": "991b421dfd401f115241601b2b373140a8d78572",
"size": 114786
},
The hash, as well as the file size, match that file exactly.
To replace this icon with another of your choosing, find an application's icon file (use the same steps 1-4 above). Once you locate the .icns file, you need to get its SHA1 digest (I use 'sha1deep' from the MacPorts package 'md5deep', but you can use anything that produces it). You will also want to note its exact file size, in bytes, to replace the information above.
I used the icon from Google Chrome, located at
/Applications/Google Chrome.app/Contents/Resources/app.icns
which has a digest of
dcba7f4d611c5b0ea02ef583284ed211f6b5c757
and a filesize of 159,992 bytes. I copied Google Chrome's app.icns file into:
~/Library/Application Support/minecraft/assets/objects/dc/dcba7f4d611c5b0ea02ef583284ed211f6b5c757
Notice that the path is '/objects/dc/' instead of '/objects/99/' to match the first 2 characters of the filename.
In the 1.7.4.json file, I replaced the entry above with:
"icons/minecraft.icns": {
"hash": "dcba7f4d611c5b0ea02ef583284ed211f6b5c757",
"size": 159992
}
I need to point out that the next time you run Minecraft, this JSON file will get overwritten. You will need to change the file permissions to read-only so Minecraft is not able to revert your changes back to the original 991...572 filename.
To make this file read-only, I opened Terminal (/Applications/Utilities/Terminal.app), navigated to the
~/Library/Application Support/minecraft/assets/indexes/
path, and used this command:
chmod 444 1.7.4.json
This removes the ability for Minecraft to update this file (it'll probably come back to bite me after the 1.7.5 and later revisions, but it works for now), and points the second, harder-to-modify Minecraft icon to the new icon (Google Chrome) instead.
Whew!
That was longer than I anticipated, but I hope it was written simply enough that anyone can understand it. Feel free to leave questions and comments.