Skip to main content

Minecraft: Bedrock Edition development kit

Project description

mcaddon

PyPI Python Downloads Status Code style: black Issues

Utility functions for creating Minecraft Bedrock Add-Ons.

Documentation: https://mcaddon.readthedocs.io/

Installation

Install the module with pip:

pip3 install mcaddon

Update existing installation: pip3 install mcaddon --upgrade

Requirements

Name Description
mclang Read and write to .lang files.
molang Molang to Python Translator & interpreter written in pure Python.
commentjson Add Python and JavaScript style comments in your JSON files.
jsonschema An implementation of JSON Schema validation for Python
chevron Mustache templating language renderer

Our Goal?

Our goal is to create a library that can create a mcaddon or mcpack from the ground up using Python.

Features

  • Load packs from any format version.
  • Supports mustache logic-less templates.

Examples

Block

from mcaddon import *

blk = Block('test:on_interact_change_state_block')
blk.add_component(OnInteractComponent(event='test_event'))
blk.add_event('test_event', SetBlockState({'custom:direction': "1"}))
blk.save('block.json')

Item

from mcaddon import *

blk = Item('minecraft:blaze_rod')
blk.add_component(FuelComponent(12.0))
blk.add_component(MaxStackSizeComponent(64))
blk.add_component(IconComponent('blaze_rod'))
blk.add_component(HandEquippedComponent(True))
blk.add_component(DisplayNameComponent('Blaze Rod'))
blk.save('item.json')

Command-line interface

Road map

  • Resource packs
    • animation_controllers
    • animations
    • attachables
    • biomes_client.json
    • blocks.json
    • cameras
    • entity
    • flipbook_textures.json
    • font
    • item_textures.json
    • materials
    • models
    • particles
    • pieces
    • render_controllers
    • sounds
    • sounds.json
    • terrain_textures.json
    • texture set
    • textures
    • ui
    • texts
  • Behavior packs
    • cameras
    • entities
    • feature_rules
    • features
    • spawn_rules
    • structures
    • trading
    • blocks
    • items
    • loot_tables
    • recipes
    • texts
    • volume
  • Skin packs
  • Addons
  • contents.json
  • cli
    • update mcaddon/mcpack
  • Support to load all format versions. (At least all versions that are used in vanilla packs)
  • Support to import packs. (for both singleplayer and on dedicated server)
  • Toolchain to load packs
  • scripting - Convert Python to the Official Minecraft Scripting and API.

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-0.0.2.tar.gz (64.6 kB view details)

Uploaded Source

File details

Details for the file mcaddon-0.0.2.tar.gz.

File metadata

  • Download URL: mcaddon-0.0.2.tar.gz
  • Upload date:
  • Size: 64.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for mcaddon-0.0.2.tar.gz
Algorithm Hash digest
SHA256 991634649b2a6076b1a80409e4db18f20b1879f4df50d2e9b418715751f78559
MD5 997160aa4b8039d9a3560bd944900269
BLAKE2b-256 6843cb7d87410c4e91af2b80804666a5c64827a42be3c0aa56302d6981c36593

See more details on using hashes here.

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