Giter VIP home page Giter VIP logo

mcpacker's Introduction

NOTE: This ReadMe is unfinished and still in progress

mcpacker

Wrapper for vberlier/mcpack, also requires python 3.7

from mcpacker import DataPacker

pack = DataPacker('my_pack', 'My description.')

pack.dump()

Installation

Using python 3.8 or high, it can be installed with pip

Currently only available from the TestPyPi instance of the Python Package Index

pip install -i https://test.pypi.org/simple/ mcpacker

Setting items

  • When setting items, the pack's name will be used as the namespace when no namespace is given:

    pack['say_hi'] = Function('say Hi!')

    is equivalent to

    pack[f'{pack.name}:say_hi'] = Function('say Hi!')

Data

Introducing separation of code and data

Package will try to load JSON data from ./data/{pack.name}.json into pack.data. If it fails, pack.data will be an empty dictionary.

Structure (each root item is optional):

  • dependencies: list of other data packs upon which pack is based. details
  • scoreboards: list of scoreboards
    • each scoreboard has the form: name criteria (display)
    • display is optional
  • functions: list of function by relative path
  • function_code: verbatim code for functions
  • function_templates: (in progress)
  • options: (in progress)
  • recipe_advancement: (in progress)
  • recipes: list of recipes

Example:

{
    "dependencies": [
        "another_pack"
    ],
    "scoreboards": [
        "my_score dummy {\"text\":\"My Score\"}",
        "my_trigger trigger"
    ]
}

Data Pack Dependency Management

Details coming soon ...

(in progress)

Functions

Functions load and tick are created automatically (if not empty)

mcpacker's People

Contributors

eli112358 avatar

Watchers

James Cloos avatar  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.