Yesterday evening I updated a blog post I wrote back in February about setting up Minecraft in Fedora to reflect recent changes in the version 1.5.1 update and new tools emerging for the distro. But, this raises a whole new question...

"How do I share saves between machines?"

Unfortunately at the time of writing Mojang didn't offer a cloud service to host save games, and server hosting can be expensive (particularly when you don't intend to play multiplayer). The next best thing is to make use of free cloud storage accounts to sync save files between computers.

By default, most cloud providers save files in a folder of the same name somewhere in your home directory (eg ~/Dropbox or C:\Users\Bob\Dropbox). We can be clever here and put our save files here, then leave a 'symbolic link' in the Minecraft directory so the game can still find it.

The difference between a symbolic link and a shortcut is that the former is treated by the file system as though it's a local directory while the latter is a file with .lnk on the end. As far as Minecraft is concerned if a symbolic link is present it still thinks the save game is in the save directory. Clever, eh?

In the case of the following examples, you only need the first line if the save folder is not already in cloud storage as this moves your existing save file to it. The second line is what creates the link.

Windows

You will first need to launch cmd.exe with administrator privilages (you can do this by searching for it in your start menu, right-clicking then selecting Run as Administrator). Then use the following commands:

move %appData%.minecraftsavessaveName C\:Users\Bob\Dropbox  
mklink /D %appData%.minecraftsavessaveName C:\Users\Bob\DropboxsaveName  

You should replace saveName with what you called your save, Dropbox if you're using a different storage provider such as Skydrive or Google Drive. Note that if you have spaces in the name of your saved game you will need to put speachmarks around the paths used here.

Mac OSX

Mac users can do all of this visually. If this is a new save you're uploading to the cloud then with a Finder window open Go > Library (if you're using Lion or later you'll need to hold down Alt key when doing this to see Library appear). Then click and drag your save folder from Application Support/minecraft/saves to your cloud storage folder.

Keep this window open, as to create the symbolic link you will need to right-click the folder you dragged across (or your existing save folder if this is already present) and select Make Alias. Then click and drag this back across to the saves folder. Finally, remove the "alias" part of the link's name in the same way you'd rename any other file by right-clicking and selecting Get Info.

EDIT: Though the Mac instructions worked fine for me, others have had problems using the visual method I've outlined here. For those who are encountering issues, open a terminal (you can find it in your Applications/Utilities folder or through spotlight) and use these commands:

mv /Users/bob/Library/Application Support/minecraft/saves/saveName Dropbox/saveName  
ln -s Dropbox/saveName /Users/bob/Library/Application Support/minecraft/saves/saveName  

You'll notice this is exactly the same as the Linux instructions, except the paths are slightly different - BM 22/03/2013

Linux

Fire up the terminal in the usual way and use the following commands:

mv ~/.minecraft/saves/saveName ~/Dropbox/saveName  
ln -s ~/Dropbox/saveName ~/.minecraft/saves/saveName  

Again, you should replace saveName with the name of your save folder and Dropbox with that of your storage provider. If you have any spaces in the name of your save you will need to escape them using the backslash key (you can also use the tab key while typing these paths to autocomplete them).

IMPORTANT NOTE!

If you move the save folder to somewhere else in your cloud storage directory you will need to delete and then recreate the symbolic links created here.  You should delete symlinks in the same way you would a directory (they should be visible in your operating system's file manager, or you can use the use the usual terminal commands for your system).

I should also note that I haven't tried this with a Minecraft server or with several people/machines connecting at the same time. It is recommended that if you want to play multiplayer that you host a LAN game in the usual way so only one instance is reading/writing to the save file at any given time.

March 22, 2013 in #gaming #tutorials #windows #linux #mac #university #Minecraft #java | | | Share on Google+