Skip to main content

beet-datapack-utils

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. For the base pack and every overlay, it copies the matching vanilla file, smooths over the format differences and writes the patched file back. Your plugin only describes what to change.

Features

  • One plugin for all versions: loop over the base pack and all overlays with Targets.
  • Vanilla patching: copy, edit and write a vanilla file in a single with block. Each vanilla version is downloaded once, and only when needed.
  • Version differences: helpers for moved registries and renamed or restructured fields.
  • Safe density function edits: search and replace nodes in JSON trees, and fail the build if the vanilla structure has changed.

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, Targets, worldgen_config


def beet_default(ctx: Context):
    for target in ctx.inject(Targets):
        with target.patch(CARVER, "minecraft:canyon") as carver:
            worldgen_config(carver)["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 and an overview of all helpers
Development Setup, tests, conventions and releasing
Changelog Changes in each release

License

MIT

Metadata

Release files for beet-datapack-utils 0.1.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 0.1.0
File Size Uploaded Provenance Actions
beet_datapack_utils-0.1.0.tar.gz 15.4 kB Without provenance Details for beet_datapack_utils-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 26.3 kB

Release files / beet_datapack_utils-0.1.0.tar.gz

Download URL beet_datapack_utils-0.1.0.tar.gz
Size 15.4 kB
Tags Source
SHA-256 checksum
How to use checksums
866a0a66144c92fb62f3f3ff2dd2b215ccb7710e32cea7310b5f2d143e1630de
BLAKE2b-256 checksum
How to use checksums
0eba418590acae600de6b93348f9082f04a803ae604170424830c5955d5c9198
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","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-0.1.0-py3-none-any.whl

Download URL beet_datapack_utils-0.1.0-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
33e0b4947d2eca8d222c6f9535e303702b0e677a9ff301e99861eb8c4ebbc8ec
BLAKE2b-256 checksum
How to use checksums
3f962fddc1e831fb168991682d1dc9974cfbe61c71875f50fdf2f230a96342a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","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 0.1.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