Skip to main content

beet-datapack-utils

CI PyPI Python License: MIT

A Python library with helpers for building multi-version Minecraft datapacks with beet.

Minecraft changes the datapack format regularly: folders are renamed, fields move or disappear. To support several Minecraft versions from one build, you need a base pack plus one overlay per version, and each of them needs its own patched copy of every vanilla file you change.

This library does that work for you. You write one plugin that describes what to change, and it is applied to the base pack and every overlay with the vanilla files of their Minecraft version.

Features

  • One plugin for all versions: versioned_packs(ctx) returns the base pack and every overlay with its Minecraft version.
  • Edit vanilla files: pack.edit(...) loads a file in a with block and writes it back. Vanilla is only downloaded when needed.
  • Version differences: CARVER, FEATURE, their tag variants, get_config, set_uniform and find_key hide moved folders and renamed or restructured fields.

Quick start

Requirements: Python 3.14 or newer and a package manager. uv is recommended.

1. Install the package in your datapack project:

uv add beet-datapack-utils

2. Configure beet.yml. Set the Minecraft version of the base pack and of each overlay:

pipeline:
  - src.plugins.canyon

meta:
  base_version: "1.21.9"
  overlay_versions:
    v26_3: "26.3"

data_pack:
  min_format: 88   # 1.21.9
  max_format: 121  # 26.3
  overlays:
    - directory: v26_3
      min_format: 121
      max_format: 121

3. Write a plugin in e.g. src/plugins/canyon.py:

from beet import Context

from beet_datapack_utils import CARVER, get_config, versioned_packs


def beet_default(ctx: Context):
    for pack in versioned_packs(ctx):
        with pack.edit(CARVER, "minecraft:canyon") as canyon:
            get_config(canyon)["probability"] = 0

4. Build the datapack:

uv run beet build

This one plugin disables canyons in every version. Before 26.3 the file is worldgen/configured_carver/canyon.json and has a config object. From 26.3 on it is worldgen/carver/canyon.json and has no config object.

Documentation

Guide Contents
Installation Requirements, installing, building and updating
Usage Configuring beet.yml, the API and examples
Development Setup, tests, conventions and releasing
Changelog Changes in each release

Metadata

Release files for beet-datapack-utils 1.0.0

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

Source distribution (sdist)

Source distribution for beet-datapack-utils 1.0.0
File Size Uploaded Provenance Actions
beet_datapack_utils-1.0.0.tar.gz 13.7 kB Without provenance Details for beet_datapack_utils-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for beet-datapack-utils 1.0.0
File Interpreter ABI Platform Actions
beet_datapack_utils-1.0.0-py3-none-any.whl Python 3 none any Details for beet_datapack_utils-1.0.0-py3-none-any.whl

Total release size: 21.7 kB

Release files / beet_datapack_utils-1.0.0.tar.gz

Download URL beet_datapack_utils-1.0.0.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
69a6acacf0fbcf54e85a0800289464062514c4cd158bd213e7fa6c47249f51bb
BLAKE2b-256 checksum
How to use checksums
875177c01ea9ebd4e5c54e14e7d1b78c8f4ff88a775b9e8074640d4d81969b99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / beet_datapack_utils-1.0.0-py3-none-any.whl

Download URL beet_datapack_utils-1.0.0-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
605b80ca320265eae1b92aaa182250f7ff760d85e1a1aefacfc0ea500e72c8ab
BLAKE2b-256 checksum
How to use checksums
795062ac62ba0783b84c0fb37a425efec0d83dbefc339fd920d5456e3bf03701
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for beet-datapack-utils 1.0.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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