Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

The Minecraft pack development kit.

License

NotificationsYou must be signed in to change notification settings

mcbeet/beet

Repository files navigation

logo

Beet

GitHub ActionsPyPIPyPI - Python VersionCode style: blackDiscord

The Minecraft pack development kit.

Introduction

Minecraftresource packs anddata packs work well asdistribution formats but can be pretty limiting asauthoring 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.

Thebeet 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. Withbeet you can seamlessly integrate all these tools in your project.

Screencasts

Library

frombeetimportResourcePack,Texture# Open a zipped resource pack and add a custom stone texturewithResourcePack(path="stone.zip")asassets:assets["minecraft:block/stone"]=Texture(source_path="custom.png")

Thebeet 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-classpytest integration with detailed assertion explanations

Toolchain

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

Thebeet 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

The package can be installed withpip.

$ pip install beet

To create and edit images programmatically you should installbeet with theimage extra or installPillow separately.

$ pip install beet[image]$ pip install beet Pillow

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

$ beet --helpUsage: 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 usespoetry.

$ poetry install --extras image

You can run the tests withpoetry run pytest. We usepytest-minecraft to run tests against actual Minecraft releases.

$ poetry run pytest$ poetry run pytest --minecraft-latest

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

$ poetry run pytest --insta review

The project must type-check withpyright. If you're using VSCode thepylance extension should report diagnostics automatically. You can also install the type-checker locally withnpm install and run it from the command-line.

$ npm run watch$ npm run check

The code follows theblack code style. Import statements are sorted withisort.

$ poetry run isort beet tests$ poetry run black beet tests$ poetry run black --check beet tests

License -MIT


[8]ページ先頭

©2009-2025 Movatter.jp