-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[minecraft-onedrive-linker] New tool
- Loading branch information
1 parent
29f8ec2
commit 4f131d1
Showing
4 changed files
with
86 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
@echo off | ||
|
||
set /p HasBackup="Have you backed up your Minecraft folder? [y/n] " | ||
|
||
if not "%HasBackup%"=="Y" if not "%HasBackup%"=="y" ( | ||
echo Please back up your Minecraft folder first. | ||
pause | ||
exit | ||
) | ||
|
||
set /p MinecraftFolderLocation="Enter the path to your Minecraft folder within your OneDrive folder, not including the path to OneDrive itself (eg. path\to\folder): " | ||
|
||
if not defined MinecraftFolderLocation ( | ||
echo Please start again and enter something this time. | ||
pause | ||
exit | ||
) | ||
|
||
set MinecraftFolderPath=%userprofile%\OneDrive\%MinecraftFolderLocation%\.minecraft | ||
|
||
if exist "%appdata%\.minecraft" ( | ||
echo There's already a .minecraft in %appdata%, please check. | ||
pause | ||
exit | ||
) | ||
|
||
if not exist %MinecraftFolderPath% ( | ||
echo There's no Minecraft folder at %MinecraftFolderPath%, please check. | ||
pause | ||
exit | ||
) | ||
|
||
mklink /J "%appdata%\.minecraft" "%userprofile%\OneDrive\%MinecraftFolderLocation%\.minecraft" | ||
|
||
chcp 65001 >nul | ||
|
||
echo ╔════════════════════════════════════════════════════════════════════════════╗ | ||
echo ║ VERY IMPORTANT: ║ | ||
echo ║ Go to where your Minecraft folder is, right-click it, and choose ║ | ||
echo ║ "Always keep on this device". It might get corrupted if you don't! ║ | ||
echo ╚════════════════════════════════════════════════════════════════════════════╝ | ||
|
||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Minecraft OneDrive Linker | ||
|
||
This Windows batch script will let you keep your Minecraft game data folder on | ||
OneDrive and thus synchronized between different computers. | ||
|
||
# How to use it | ||
|
||
Before doing anything: MAKE A BACKUP OF YOUR MINECRAFT FOLDER. This script | ||
comes with no guarantees! On Windows it's called `.minecraft` and is found in | ||
the `%AppData%` folder. Type that into the Explorer address bar and it will | ||
expand to the full path. | ||
|
||
On the computer that has the Minecraft installation you want to synchronize: | ||
|
||
1. Move your Minecraft folder into wherever you want to keep it in your OneDrive folder. | ||
2. Run the script by double-clicking it and answer the prompts. | ||
3. Wait for the folder to finish uploading to OneDrive. | ||
|
||
On the other computer(s): | ||
|
||
1. Move any existing Minecraft folder out of `%AppData%`. | ||
2. Run the script by double-clicking it and answer the prompts. | ||
3. Wait for the folder to finish downloading from OneDrive. | ||
|
||
Go mine and craft! | ||
|
||
# Important note | ||
|
||
The script will tell you how to get OneDrive to always keep a local copy of the folder (exempt it from Files On-Demand). If you don't there's a risk of the game getting confused looking for files that aren't technically there. Also, when switching between machines, YOU MUST wait for the game files to sync up and then down again before starting to play. | ||
|
||
# Putting things back how they were | ||
|
||
Delete the `.minecraft` directory link in `%AppData%` and move the real folder back there. Obviously make sure it's fully synchronized before doing that. | ||
|
||
# DISCLAIMER | ||
|
||
This is a very hacky workaround for OneDrive not letting you add arbitrary file paths. This software comes with no guarantees or warranty of usefulness whatsoever and you run it at your own risk. Regularly back up your Minecraft folder! | ||
|