Get paths to Minecraft Java, Bedrock, Preview, and Education Edition folders, launchers, executables and java runtime.
Install the module with pip:
pip3 install mcpath
Update existing installation: pip3 install mcpath --upgrade
Java | Bedrock | Preview/Beta | Education | |
---|---|---|---|---|
Android [1] | ❌ | ✅ | ❌ | ❌ |
Darwin | ✅ [3] | ❌ | ❌ | ❌ |
iOS [2] | ❌ | ✅ | ✅ | ✅ |
Linux | ✅ | ✅ [4] | ❌ | ❌ |
Windows | ✅ | ✅ | ✅ | ✅ |
- With Pydroid 3
- With Pyto
- Has not been tested.
- With mcpelauncher.
Name | Usage |
---|---|
requests |
Get runtime component and version using Mojang's API |
requests-cache |
For caching version data. |
import mcpath
print(mcpath.java.get_saves_dir())
# C:\Users\USER\AppData\Roaming\.minecraft\saves
import mcpath
print(mcpath.java.get_root_dir())
# C:\Users\USER\AppData\Roaming\.minecraft
import mcpath
print(mcpath.java.get_game_dir())
# D:\minecraft
import mcpath
print(mcpath.java.get_runtime('1.21.3'))
# C:\Users\USER\AppData\Local\Packages\Microsoft.4297127D64EC6_8wekyb3d8bbwe\LocalCache\Local\runtime\java-runtime-delta\windows-x64\java-runtime-delta\bin\java.exe