Skip to main content

Get paths to Minecraft Java, Bedrock, Preview, and Education Edition folders.

Project description

mcpath

Tests PyPI Python Downloads Status Code style: black Issues

Get paths to Minecraft Java, Bedrock, Preview, and Education Edition folders, launchers, executables and java runtime.

Installation

Install the module with pip:

pip3 install mcpath

Update existing installation: pip3 install mcpath --upgrade

Supported Platforms

Java Bedrock Preview/Beta Education
Android [1]
Darwin [3]
iOS [2]
Linux [4]
Windows
  1. With Pydroid 3
  2. With Pyto
  3. Has not been tested.
  4. With mcpelauncher.

Requirements

Name Usage
requests Get runtime component and version using Mojang's API
requests-cache For caching version data.

Examples

Saves

import mcpath

print(mcpath.java.get_saves_dir())
# C:\Users\USER\AppData\Roaming\.minecraft\saves

.minecraft

import mcpath

print(mcpath.java.get_root_dir())
# C:\Users\USER\AppData\Roaming\.minecraft

Game

import mcpath

print(mcpath.java.get_game_dir())
# D:\minecraft

Java Runtime Executable

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcpath-2.0.1.tar.gz (11.9 kB view details)

Uploaded Source

File details

Details for the file mcpath-2.0.1.tar.gz.

File metadata

  • Download URL: mcpath-2.0.1.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for mcpath-2.0.1.tar.gz
Algorithm Hash digest
SHA256 385469b34ba06f7d7fa3ee2c25a97eb9bcb45f58f0a00f40d3938bcd9edcaa8c
MD5 5a33a7a96f2df7ac36c7ea93f92fc614
BLAKE2b-256 5baaf8f30e9a2bc481fdba09292304459673dbf7de419e8ae4e5e0a0ec57206f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page