Skip to main content

mcpywrap

用 Python 标准项目与依赖管理方式开发《我的世界》中国版 Mod 和资源包。

PyPI Version License

mcpywrap 使用 pyproject.toml 管理项目,支持安装 Python 包依赖,也支持直接引用本地 Addon 目录。它将依赖管理、资源构建、游戏运行和 MC Studio 编辑器串成一套开发流程,方便多个项目共享代码与资源。

安装

需要 Python 3.9 或更高版本。游戏和编辑器启动功能需要 Windows、MC Studio 及已下载的游戏引擎。

推荐通过 uv 安装:

uv tool install mcpywrap

也可以使用 pip install mcpywrap。安装完成后,运行 mcpy --help 查看命令。

开始使用

进入你的 Addon 或地图项目目录,按向导初始化:

mcpy init

之后可以直接运行游戏测试,或在 MC Studio 编辑器中打开项目:

mcpy run
mcpy edit

需要查看项目和管理依赖时,运行 mcpy ui 打开图形界面。

复用代码和资源

对于已发布的 Python 包,使用包名添加依赖:

mcpy add "package-name>=1.0"

对于本机已有的 Addon,直接引用它的目录:

mcpy add --path "../shared-addon"

本地 Addon 无需先初始化或安装,可以直接使用 MCS 导出的目录。请选择包含行为包或资源包的 Addon 根目录;相对路径以当前项目目录为基准。

移除依赖使用 mcpy remove <包名> 或 mcpy remove --path <目录>。移除本地引用不会删除源目录。不带参数运行 mcpy add / mcpy remove 可进入选择向导。

本地路径适合同机开发;与他人共享项目时,需要同步这些目录,或将可复用组件发布为 Python 包。目录结构、配置及构建规则见本地依赖参考。

构建与日常开发

命令 用途
mcpy build 将项目和依赖构建到配置的输出目录
mcpy dev 监控 Addon 源码与依赖变化,持续更新构建结果
mcpy mod 通过向导创建 Python Mod 框架
mcpy modsdk 管理网易 ModSDK
mcpy run -n 创建新的游戏测试实例
mcpy run -l 查看已有实例
mcpy run -d <ID前缀> 删除指定实例

mcpy run 默认复用最近创建的实例。构建时主项目内容优先于依赖;修改依赖声明后,请重新启动 mcpy dev。

游戏启动与排查

通常不需要手动指定游戏路径。mcpywrap 会优先查找 MC Studio 登记的安装,必要时搜索固定磁盘中的标准下载目录,并跳过不完整的引擎版本。

遇到找不到游戏或缺少资源的提示,先运行:

mcpy doctor

需要使用特定版本时,可以临时指定:

mcpy run --engine-version 3.10.0.420447

已有实例默认保留原引擎版本;显式指定版本可以切换。自定义路径、项目级设置和环境变量的用法见引擎配置参考。

更多信息

MIT License © EaseCation

Metadata

Release files for mcpywrap 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcpywrap 0.3.1
File Size Uploaded
mcpywrap-0.3.1.tar.gz 120.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcpywrap 0.3.1
File Interpreter ABI Platform
mcpywrap-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 245.0 kB

Release files / mcpywrap-0.3.1.tar.gz

Download URL mcpywrap-0.3.1.tar.gz
Size 120.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2e5b8936d61a09c8713bf813ccb42c0d9925f41c8b991b537a15f3cda13d1771
BLAKE2b-256 checksum
How to use checksums
2d289f2033051ca670c384251ce6cfaf998fc3ddfc389f8920f137c95fa41057
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.

Transparency log

Release files / mcpywrap-0.3.1-py3-none-any.whl

Download URL mcpywrap-0.3.1-py3-none-any.whl
Size 124.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7467df1cc686c6268fd1f8b934632208d1c6d8e825c6a05a6dbd67f115efeb65
BLAKE2b-256 checksum
How to use checksums
38a778ad6b8a242658b3ca165f6f9ec6d4f3f9036579a45c8a8209453260506e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.13

2 release files

0.3.12

2 release files

0.3.11

2 release files

0.3.10

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page