Skip to main content

Minecraft: Bedrock Edition development kit

Project description

mcaddon

Tests PyPI Python Downloads Status Code style: black Issues

Utility functions for creating Minecraft Bedrock Add-Ons.

Installation

Install the module with pip:

pip3 install mcaddon

Update existing installation: pip3 install mcaddon --upgrade

Requirements

Name Usage
mini-racer JavaScript engine for Python
pillow Handling images
rapidnbt Reading/writing NBT
pydantic Data validation
mcpath Paths to Minecraft bedrock folders
mclang Read/write to .lang files
molang Molang translator & interpreter
commentjson Reading JSON files with comments
watchdog Monitor file system changes
Deprecated Deprecated files and functions

Features

  • Create Minecraft Bed rock add-ons with Python.
  • Build behavior packs and resource packs.
  • Define custom blocks and items.
  • Use a modular, component based system.
  • Export to Minecraft JSON files.
  • Load and edit existing packs.
  • Generate content with templates.
  • Tools for managing and packaging add-ons.
  • Optional scripting and integrations.

Examples

Block

from mcaddon import *

block = Block()
block.description.identifier = "test:on_interact_change_state_block"
block.components.add(BlockGeometryComponent())
block.components.add(
    BlockMaterialInstancesComponent().add(MaterialInstance(texture="stone"))
)
block.components.add(BlockCollisionBoxComponent())
block.components.add(BlockSelectionBoxComponent())
block.save("block.json")

Item

from mcaddon import *

item = Item()
item.description.identifier = "minecraft:blaze_rod"
item.components.add(ItemFuelComponent(duration=12))
item.components.add(ItemMaxStackSizeComponent(value=64))
item.components.add(ItemIconComponent().add("blaze_rod"))
item.components.add(ItemHandEquippedComponent())
item.components.add(ItemDisplayNameComponent(value="Blaze Rod"))
item.save("item.json")

Command-line interface

usage: mcaddon [-h] [-V] {show,package} ...

Description

positional arguments:
  {show,package}
    show                Shows a GUI for cli tools
    package             Package a pack or world

options:
  -h, --help            show this help message and exit
  -V, --version         print the mcaddon version number and exit.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcaddon-1.0.0a1.tar.gz (145.5 kB view details)

Uploaded Source

File details

Details for the file mcaddon-1.0.0a1.tar.gz.

File metadata

  • Download URL: mcaddon-1.0.0a1.tar.gz
  • Upload date:
  • Size: 145.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mcaddon-1.0.0a1.tar.gz
Algorithm Hash digest
SHA256 32fcc839cfc53b490a542fc6363fead4a614bf1d0d555c749a80633a9fdc596c
MD5 cbbc6060fe4defdddac117857db88d66
BLAKE2b-256 ab578258efd9c7e6fd9f6765cc18533014d0d34b19c59909ea0c248a0a19cd16

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcaddon-1.0.0a1.tar.gz:

Publisher: python-publish.yml on legopitstop/mcaddon

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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