Skip to main content

The Minecraft pack development kit

Project description

logo

Beet

GitHub Actions PyPI PyPI - Python Version Discord

The Minecraft pack development kit.

Introduction

Minecraft resource packs and data packs work well as distribution formats but can be pretty limiting as authoring formats. You can quickly end up having to manage hundreds of files, some of which might be buried within the bundled output of various generators.

The beet project is a development kit that tries to unify data pack and resource pack tooling into a single pipeline. The community is always coming up with pre-processors, frameworks, and generators of all kinds to make the developer experience more ergonomic. With beet you can seamlessly integrate all these tools in your project.

Screencasts

Library

from beet import ResourcePack, Texture

# Open a zipped resource pack and add a custom stone texture
with ResourcePack(path="stone.zip") as assets:
    assets["minecraft:block/stone"] = Texture(source_path="custom.png")

The beet library provides carefully crafted primitives for working with Minecraft resource packs and data packs.

  • Create, read, edit and merge resource packs and data packs
  • Handle zipped and unzipped packs
  • Fast and lazy by default, files are transparently loaded when needed
  • Statically typed API enabling rich intellisense and autocompletion
  • First-class pytest integration with detailed assertion explanations

Toolchain

from beet import Context, Function

def greet(ctx: Context):
    """Plugin that adds a function for greeting the player."""
    ctx.data["greet:hello"] = Function(["say hello"], tags=["minecraft:load"])

The beet toolchain is designed to support a wide range of use-cases. The most basic pipeline will let you create configurable resource packs and data packs, but plugins make it easy to implement arbitrarily advanced workflows and tools like linters, asset generators and function pre-processors.

  • Compose plugins that can inspect and edit the generated resource pack and data pack
  • Configure powerful build systems for development and creating releases
  • First-class template integration approachable without prior Python knowledge
  • Link the generated resource pack and data pack to Minecraft
  • Automatically rebuild the project on file changes with watch mode
  • Batteries-included package that comes with a few handy plugins out of the box
  • Rich ecosystem, extensible CLI, and powerful generator and worker API

Installation

We recommend uv (https://github.com/astral-sh/uv#installation). With uv installed, you can try beet by running uvx beet. You can also install beet as a global tool on your machine.

$ uv tool install beet

If you see the message warning: ... is not on your PATH, you'll need to add the specified directory to your global path to invoke beet directly instead of using uvx beet.

You can make sure that beet was successfully installed by trying to use the toolchain from the command-line.

$ beet --help
Usage: beet [OPTIONS] COMMAND [ARGS]...

  The beet toolchain.

Options:
  -p, --project PATH  Select project.
  -s, --set OPTION    Set config option.
  -l, --log LEVEL     Configure output verbosity.
  -v, --version       Show the version and exit.
  -h, --help          Show this message and exit.

Commands:
  build  Build the current project.
  cache  Inspect or clear the cache.
  link   Link the generated resource pack and data pack to Minecraft.
  watch  Watch the project directory and build on file changes.

Contributing

Contributions are welcome. Make sure to first open an issue discussing the problem or the new feature before creating a pull request. The project uses uv.

$ uv sync

You can run the tests with uv run pytest. We use pytest-minecraft to run tests against actual Minecraft releases.

$ uv run pytest
$ uv run pytest --minecraft-latest

We also use pytest-insta for snapshot testing. Data pack and resource pack snapshots make it easy to monitor and review changes.

$ uv run pytest --insta review

The code is formatted and checked with ruff.

$ uv run ruff format
$ uv run ruff check

The documenation site uses Zensical.

$ uv run zensical serve
$ uv run zensical build

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

beet-0.116.0.tar.gz (95.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

beet-0.116.0-py3-none-any.whl (125.3 kB view details)

Uploaded Python 3

File details

Details for the file beet-0.116.0.tar.gz.

File metadata

  • Download URL: beet-0.116.0.tar.gz
  • Upload date:
  • Size: 95.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for beet-0.116.0.tar.gz
Algorithm Hash digest
SHA256 11e680777f8f5f9a139c70e6f0b51067552bad36726e7dc64e3136a91b1edf5a
MD5 664fb90f1085948ebb0bf8a8962b6d46
BLAKE2b-256 2a0bcf16e81838c3bc23dd4752bb11e874b6ade6692ed66be4cf07bde267b754

See more details on using hashes here.

File details

Details for the file beet-0.116.0-py3-none-any.whl.

File metadata

  • Download URL: beet-0.116.0-py3-none-any.whl
  • Upload date:
  • Size: 125.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for beet-0.116.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0955308e3768fe40119c70ba047b411485fef3164a6da77e6e8fb172d5cd23c7
MD5 a447a57d16a5876fdc9cc08e480ed47b
BLAKE2b-256 6dcf80c118bec8247bd1d1d7270152f683a9e4edf49f7ef46ec92e9ce9799ada

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