NOTE: This ReadMe is unfinished and still in progress
Wrapper for vberlier/mcpack, also requires python 3.7
from mcpacker import DataPacker
pack = DataPacker('my_pack', 'My description.')
pack.dump()
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
-
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!')
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"
]
}
Details coming soon ...
(in progress)
Functions load
and tick
are created automatically (if not empty)