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.0.tar.gz
(14.7 kB
view hashes)
Built Distribution
crankshaft-0.9.0-py3-none-any.whl
(34.6 kB
view hashes)
Close
Hashes for crankshaft-0.9.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e3ba44af6fb67a2a6785f3b2f9b6b5f887b322477bb52166a199f6ee2b10052 |
|
MD5 | dc4d6fdb2267f01b7a116a851b1a2d14 |
|
BLAKE2b-256 | 2ca56f9fee9b75b8b195d4a2ee67ce524b864ccc49bf105ea3f9625683e3ab7e |