Skip to content

TSKsmiley/MCTL-Interpreter

Repository files navigation

The Minecraft Turtle Language

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.

How to build and try out

  1. Ensure you have a Java 17 compiler with Gradle installed.
  2. Initialize the Gradle project.
  3. Run the Gradle task MCTL-Interpreter > Tasks > forgegradle runs > genIntelliJRuns. (could differ depending on your setup)
  4. 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:

Add an MCTL file to Minecraft

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.

Load a file

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".

Format a file

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.

Code examples

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages