Metadata-Version: 2.1
Name: mcpath
Version: 2.0.1
Summary: Get paths to Minecraft Java, Bedrock, Preview, and Education Edition folders.
Home-page: https://github.com/legopitstop/mcpath/
Author: Legopitstop
Author-email: contact@lpsmods.dev
License: MIT
Project-URL: Download, https://github.com/legopitstop/mcpath/releases
Project-URL: Documentation, https://docs.lpsmods.dev/mcpath/
Project-URL: Source Code, https://github.com/legopitstop/mcpath
Keywords: minecraft,paths,java,bedrock,preview,education,world,screenshots,resourcepacks,behaviorpacks
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Provides-Extra: testing
License-File: LICENSE

# mcpath

![Tests](https://github.com/legopitstop/mcpath/actions/workflows/tests.yml/badge.svg)
[![PyPI](https://img.shields.io/pypi/v/mcpath)](https://pypi.org/project/mcpath/)
[![Python](https://img.shields.io/pypi/pyversions/mcpath)](https://www.python.org/downloads//)
![Downloads](https://img.shields.io/pypi/dm/mcpath)
![Status](https://img.shields.io/pypi/status/mcpath)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
[![Issues](https://img.shields.io/github/issues/legopitstop/mcpath)](https://github.com/legopitstop/mcpath/issues)

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

## Installation

Install the module with pip:

```bat
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](https://play.google.com/store/apps/details?id=ru.iiec.pydroid3&hl=en_US)
2. With [Pyto](https://apps.apple.com/us/app/pyto-ide/id1436650069)
3. Has not been tested.
4. With [mcpelauncher](https://mcpelauncher.readthedocs.io/en/latest/).

## Requirements

| Name                                                         | Usage                                                |
| ------------------------------------------------------------ | ---------------------------------------------------- |
| [`requests`](https://pypi.org/project/requests/)             | Get runtime component and version using Mojang's API |
| [`requests-cache`](https://pypi.org/project/requests-cache/) | For caching version data.                            |

## Examples

### Saves

```Python
import mcpath

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

### `.minecraft`

```Python
import mcpath

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

### Game

```Python
import mcpath

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

### Java Runtime Executable

```Python
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
```
