Minecraft Path
Represents minecraft directory path and structure.
You can customize Minecraft game directory path and structure where all game files is stored.
Example
Initialize MinecraftLauncher
with custom Minecraft path and default directory structure.
Default directory path
You can get default game directory path using MinecraftPath.GetOSDefaultPath()
, or create new instance of MinecraftPath
without any arguments.
Default Minecraft path is:
Windows:
%appdata%.minecraft
Linux:
$HOME/.minecraft
macOS:
$HOME/Library/Application Support/minecraft
Default directory structure
Make custom directory structure
There are two ways to make custom directory structure.
All paths are stored as absolute paths, even when a relative path is passed.
Set properties
Set path properties to what you want. All properties (Libraries
, Versions
, etc) are described in
Inheritence
When receiving a relative path as an argument, make sure to convert it to an absolute path and store it.
Create derived class of MinecraftPath
, and override methods. Each methods (CreateDirs
, NormalizePath
, etc) are described in .
API References
Last updated