Package: beet
BeetThe Minecraft pack development kit.IntroductionMinecraftresource packsanddata packswork well asdistributionformats but can be pretty limiting asauthoringformats. You can quickly end up having to manage hundreds of files, some of which might be buried within the bundled output of various generators.Thebeetproject 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. Withbeetyou can seamlessly integrate all these tools in your project.ScreencastsQuick starthttps://youtu.be/JGrJTOhG3pYCommand-linehttps://youtu.be/fQ9up0ELPNELibrary overviewhttps://youtu.be/LDvV4_l-PScPlugins basicshttps://youtu.be/XTzKmvHqd1gPipeline configurationhttps://youtu.be/QsnQncGxAAsLibraryfrombeetimportResourcePack,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")Thebeetlibrary provides carefully crafted primitives for working with Minecraft resource packs and data packs.Create, read, edit and merge resource packs and data packsHandle zipped and unzipped packsFast and lazy by default, files are transparently loaded when neededStatically typed API enabling rich intellisense and autocompletionFirst-classpytestintegration with detailed assertion explanationsToolchainfrombeetimportContext,Functiondefgreet(ctx:Context):"""Plugin that adds a function for greeting the player."""ctx.data["greet:hello"]=Function(["say hello"],tags=["minecraft:load"])Thebeettoolchain 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 packConfigure powerful build systems for development and creating releasesFirst-class template integration approachable without prior Python knowledgeLink the generated resource pack and data pack to MinecraftAutomatically rebuild the project on file changes with watch modeBatteries-included package that comes with a few handy plugins out of the boxRich ecosystem, extensible CLI, and powerful generator and worker APIInstallationThe package can be installed withpip.$pipinstallbeetTo create and edit images programmatically you should installbeetwith theimageextra or installPillowseparately.$pipinstallbeet[image]$pipinstallbeetPillowYou can make sure thatbeetwas successfully installed by trying to use the toolchain from the command-line.$beet--help
Usage:beet[OPTIONS]COMMAND[ARGS]...Thebeettoolchain.

Options:-p,--projectPATHSelectproject.-s,--setOPTIONSetconfigoption.-l,--logLEVELConfigureoutputverbosity.-v,--versionShowtheversionandexit.-h,--helpShowthismessageandexit.

Commands:buildBuildthecurrentproject.cacheInspectorclearthecache.linkLinkthegeneratedresourcepackanddatapacktoMinecraft.watchWatchtheprojectdirectoryandbuildonfilechanges.ContributingContributions are welcome. Make sure to first open an issue discussing the problem or the new feature before creating a pull request. The project usespoetry.$poetryinstall--extrasimageYou can run the tests withpoetry run pytest. We usepytest-minecraftto run tests against actual Minecraft releases.$poetryrunpytest
$poetryrunpytest--minecraft-latestWe also usepytest-instafor snapshot testing. Data pack and resource pack snapshots make it easy to monitor and review changes.$poetryrunpytest--instareviewThe project must type-check withpyright. If you're using VSCode thepylanceextension should report diagnostics automatically. You can also install the type-checker locally withnpm installand run it from the command-line.$npmrunwatch
$npmruncheckThe code follows theblackcode style. Import statements are sorted withisort.$poetryrunisortbeettests
$poetryrunblackbeettests
$poetryrunblack--checkbeettestsLicense -MIT