Skip to main content

A flexible Minecraft command library

Project description

logo

Mecha

GitHub Actions PyPI PyPI - Python Version Code style: black

A flexible Minecraft command library.

Introduction

This package provides a versatile API for generating Minecraft commands in Python. It uses the beet library to generate functions and integrates natively with the beet pipeline.

from beet import Context
from mecha import Mecha

def my_plugin(ctx: Context):
    mc = ctx.inject(Mecha)

    with mc.function("foo"):
        mc.say("hello")

You can directly create handles from data pack instances. The library can be used on its own without being part of a beet pipeline.

from beet import DataPack
from mecha import Mecha

with DataPack(path="demo") as data:
    mc = Mecha(data)

    with mc.function("foo"):
        mc.say("hello")

Installation

The package can be installed with pip.

$ pip install mecha

License - MIT

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

mecha-0.1.0.tar.gz (5.8 kB view hashes)

Uploaded Source

Built Distribution

mecha-0.1.0-py3-none-any.whl (6.0 kB view hashes)

Uploaded Python 3

Supported by

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