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.8.1.tar.gz
(14.4 kB
view hashes)
Built Distribution
crankshaft-0.8.1-py3-none-any.whl
(33.6 kB
view hashes)
Close
Hashes for crankshaft-0.8.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff338f69516d3d2f441fd27bc2a505a62714f7739c3d1ad333ca642fc10628a2 |
|
MD5 | 4866b3817ad7037a57729b56f484799b |
|
BLAKE2b-256 | 4f975e8cb3eacbaafd308f6981be3717c7b88a25df4328dbf3d75e6211662150 |