MCTL is a beginner friendly programming language for a programmable turtle in Minecraft. It is intended for use in schools as a tool to to introduce students to the concept of programming.
Preview.mp4
The student will write and run programs that control a turtle in a Minecraft world. The turtle can move around and build structures by placing blocks.
We hope that the student will be more engaged and motivated to learn about programming, because it directly results in them being able to build sweet things in Minecraft.
The MCTL interpreter at libs/MCTL.jar
is developed here: https://github.com/AlbertHald/Minecraft-Turtle-Language.
- Ensure you have a Java 17 compiler with Gradle installed.
- Initialize the Gradle project.
- Run the Gradle task
MCTL-Interpreter > Tasks > forgegradle runs > genIntelliJRuns
. (could differ depending on your setup) - Run the Gradle task
MCTL-Interpreter > Tasks > forgegradle runs > runClient
.
Wait a little while, and a new Minecraft window should pop up. From here you can open a world and start running code:
When you have written a script that you want to run in Minecraft, you need to add it to the folder run/mctl-scripts
.
There should already be an example.mctl
file present, which is autogenerated.
Open the chat and write /loadfile "FILENAME"
. But replace FILENAME with the name of the MCTL file that you added previously.
If you just want to try an example, run /loadfile "example"
.
MCTL can reformat a file to follow best practices, which makes the code easier to read.
To do this, open the chat and write /formatfile "FILENAME"
. But replace FILENAME with the name of the MCTL file that you want to format.
The formatted code will be written to a new file called FILENAME.formatted.mctl
.
If you want to see examples of working code, check out these files: https://github.com/AlbertHald/Minecraft-Turtle-Language/tree/main/src/test/java/dk/aau/p4/abaaja/EndToEnd/Code.