Same datapacks. Better execution.
Write your code as you wish. Once you got to a point where you would like to check in-game just click on the Convert button in the top right corner of the editor while in an mcfunction file. Or alternatively use the convert
command in the Command Palette (Ctrl + Shift + P
). A new, runnable datapack should be created next to the project's folder in bdout
, or at the specified location in bdconfig.json
.
Here are all the features it gives. The Config file isn't necessary, anything can be nested.
You can configure the converting process by creating a bdconfig.json
file at the root of your project. If you don't have this file then the extension will use default values.
Property Name | Type | Default value | Description |
---|---|---|---|
bdLoad | string |
"bdload" |
The mcfunction file that loads up all the necessary scores/forceloads/setblocks/summons etc. |
executeNames | string |
"exec" |
Name of the mcfunctions created for better executes |
outputPath | string |
"yourFolder/bdout" |
The location where the datapack will be outputted |
hideInfo | bool |
false |
Hides the successful convertion popup |
tryScore | string |
"try" |
"Player's" name used to test trycatches |
tryFunctions | string |
"try" |
Name of the mcfunctions created for trycatches |
tryObjective | string |
"tryscore" |
Scoreboard objective's name created to test trycatches |
Example:
{
"bdLoad": "load",
"execNames": "executeFunction",
"outputPath": "path/to/the/output/directory",
"hideInfo": true,
"tryScore": "t",
"tryFunctions": "tryFunc",
"tryObjective": "try"
}
You no longer need to cram long complex commands in a single line. However you will need to use slashes at the start of each one. They also must start at the beggining of the line. I recommend using an understandable and uniform format.
Example:
Most programming languages support this, but in Minecraft you have to make a new file to have a different function. Since BD 1.2.0, you can declare functions inside functions like this: /mcfunction <function_name> { <code> }
. If it was declared in custom:main, then you can call the new one like so: custom:main/function_name.
Example:
It can be frustrating trying to find a reasonable method to run multiple commands when an execute condition is true. In BD 1.3+ if you put braces after run
you will be able to put as many commands in there as you wish.
Example:
For support join my Discord server
Source code on Github
Inspiration and similar projects: Command Combiner Pro, Trident