Python in MCFunction
Create reusable variables and use loops directly in your .mcfunction-files.
store result score #rotation temp random value 0..7
for i in range(0, 8):
r = i * 45
if score #rotation temp matches i data modify entity @s Rotation[0] set value r
scoreboard players reset #rotation temp
Nested Commands
Stack /execute-commands or define custom functions in a
single file - Beet generates the function files for you.
TODO
Get Started
Python is the programming language in which Beet and Beet plugins are written.
pip install beet
Run this command in the console to install Beet.
To start your project, create a file named beet.json in the your project folder. This file contains all the configurations for your project.
{
"name": "My First Pack",
"author": "Me!",
"description": "I'm learning Beet",
"data_pack": {
"load": [
"src"
]
},
"output": "build"
}This beet configuration file describes a basic data pack which has a name, a description, a folder location from where to load the data pack, and finally, where the generated result will be produced.
To test it out, you can create a data pack function inside the src folder.
say Hello, Beet!
beet build
Run this command in the console to build your data pack. You can check out the result in
the build folder!
Alternatively, Beet can watch the source files and automatically build the pack when it detects changes:
beet watch
You can also also link the output pack to a world in your saves folder with this command:
beet link "My World"
If you are using a third-party launcher, you can use a link to your Minecraft world instead.
