Bolt datapack flow control library.
Project description
crankshaft
Flow control library for the Bolt scripting language.
Introduction
Minecraft version: 1.20.1
This library implements various flow control APIs, which excel at speeding up prototyping and creating datapacks.
from crankshaft:api import Listener
from crankshaft:events import on_load, on_player_join, on_player_jump
from crankshaft:flags import is_sneaking
@Listener(on_load)
def load():
tellraw @a "datapack loaded!"
@Listener(on_player_join)
def player_join():
say "I just joined the server!"
@Listener(on_player_jump)
def player_jump():
if not is_sneaking:
tellraw @a "JUMP!"
else:
tellraw @a "JUMP!... (I was sneaking as well)"
Installation
pip install crankshaft
Getting started
The library is designed to be used within any bolt
script (either a .mcfunction
or bolt
file) inside a bolt
enabled project.
require:
- bolt
- crankshaft
pipeline:
- mecha
Once you've required bolt
and crankshaft
, you are able to import the package's api
module directly inside your bolt script.
Most of the imports come from the crankshaft:api
module as shown below.
from crankshaft:api import Listener
Now you're free to use the API!
Documentation
Coming soon...
License - MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
crankshaft-0.9.1.tar.gz
(14.7 kB
view hashes)
Built Distribution
crankshaft-0.9.1-py3-none-any.whl
(34.7 kB
view hashes)
Close
Hashes for crankshaft-0.9.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81ee73d4846f52a301b67b0301eab244b3a7b46bd93d7fd9e296eabd13b5b296 |
|
MD5 | 2ab4476188ef066cd253b31b731b80fa |
|
BLAKE2b-256 | 44a4e4f93e41f0c89e75c2d60c40c567c7fb270d0f162848999009052bf1d50b |