Code Monkey home page Code Monkey logo

mcaddon's Introduction

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
Pillow Python Imaging Library (Fork)
numpy Fundamental package for array computing in Python
PyGLM OpenGL Mathematics library for Python

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', SetBlockProperty({'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

usage: mcaddon [-h] [-V] [-W [<file>]]

options:
  -h, --help            show this help message and exit
  -V, --version         print the mcaddon version number and exit.
  -W [<file>], --watch [<file>]
                        Watches this Python file for changes.

Road map

  • Resource packs
    • animation_controllers
    • animations
    • attachables
    • biomes_client.json
    • block models
    • entity
    • flipbook_textures.json
    • font
    • materials
    • particles
    • pieces
    • render_controllers
    • sounds
    • sounds.json
    • texture set
    • ui
    • blocks.json
    • entity models
    • item_textures.json
    • terrain_textures.json
    • texts
    • textures
  • Behavior packs
    • entities
    • spawn_rules
    • structures
    • blocks
    • cameras
    • feature_rules
    • features
    • items
    • loot_tables
    • recipes
    • texts
    • trading
    • volume
    • block_culling
  • 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)
  • Make Model and Texture support common 3D rendering libraries; pygame, moderngl, etc
  • Toolchain to load packs
  • scripting - Convert Python to the Official Minecraft Scripting and API.

mcaddon's People

Contributors

legopitstop avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.