Bolt datapack flow control library.
Project description
crankshaft
Flow control library for the Bolt scripting language.
Introduction
Minecraft version: 1.19.4
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.4.0.tar.gz
(14.2 kB
view hashes)
Built Distribution
crankshaft-0.4.0-py3-none-any.whl
(33.1 kB
view hashes)
Close
Hashes for crankshaft-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e50b4fe7bc0b32801d070c4a46187d63be2998c109e547d12be397fa9eed1556 |
|
MD5 | 404e9b3fc9d36b2431fcffd03edbccd3 |
|
BLAKE2b-256 | 1a7daec2d3ca176811e0a590b9a038da8071ec54052eaef0230cbbd7f8828202 |