(lizard in German is pronounced like exe and it is written in Zig, which also has a lizard as mascot)
mcexe is a transpiler that converts minecraft datapacks and commands into real executable programs.
It does that by interpreting different commands, for example /give @s paper[minecraft:item_name="test_file"]
, and generates Zig code.
In this case, the command would create a txt
file with the name test_file
in the current working directory
.
It then compiles the generated Zig file to the specified executable file.
Because it uses Zig as intermediate language, it will have (nearly) all the capabilities of Zig.
- (optional) Add the folder where you unzipped the files to your path environment variables for easier access to the mcexe command.
- Run mcexe either directly in your datapack root directory without arguments or
run it from anywhere else with the--path "path/to/your/datapack"
arguments (It automatically recognizes if it's an absolute or relative file path) - Retrieve your compiled program from the newly generated
out
folder in your datapack. (There will also be subfolders that contain other files for internal stuff)
Use
-h
or--help
for more info on all options
- multiline commands
- everything else than function files (advancements, predicates, loot tables, etc.)