Pierce01 / MinecraftLauncher-core

Lightweight module that downloads and runs Minecraft using javascript / NodeJS
MIT License
359 stars 82 forks source link

Add a gameDirectory to your options #52

Closed MT224244 closed 4 years ago

MT224244 commented 4 years ago

Allows you to specify a working directory for the game, separate from the location where the launcher is running. This is worthy of a "GAME DIRECTORY" section in the official launcher.

Pierce01 commented 4 years ago

This can already be achieved by using root. root is where your launcher will work in (downloading the game files, starting the process in that folder, etc.).

MT224244 commented 4 years ago

With the current implementation, if you want to separate profiles, you have to download all the resources for each profile again. By separating the root and gameDirectory, you can download the resources for the first time only. After that, you can download only the data in the profile, which I think has the advantage of skipping the resource download.

Thank you.

.minecraft/ (root)
├── assets/
├── libraries/
├── logs/
├── natives/
└── versions/
profile1/ (gameDirectory)
├── resourcepacks/
└── saves/
profile2/ (gameDirectory)
├── resourcepacks/
└── saves/
...
Pierce01 commented 4 years ago

Oh, I see what you mean now! Will look into more when I have the time, thank you for the PR!