Sublime is an incredibly powerful text editor. Learning how to use it effectively is key to keeping your Minecraft commands maintainable.
Why would I want to do this?
The answer is very simple:
To deploy and test code as quickly and as efficiently as possible.
The longer answer?
By writing code in a text editor, syncing immediately becomes an issue. With this tool, we ensure our code makes it into the game without error. You will shift your attention to where it needs to be: creating awesome custom maps.
I will give you the step-by-step instructions first, then explain what each configuration option means.
- Install Sublime, Minecraft Syntax Highlighter, and Smelt
- Ensure you’ve properly configured Smelt (read instructions thoroughly)
- From Sublime’s main window:
- Tools -> Build System -> New Build System…
- A document will open with a document which looks like this:
- Replace all the text above with this:
"shell_cmd": "smelt compile $file --copy",
- Save this file (File -> Save) as “Smelt”
You’ve now configured Sublime to recognize <files>.mcc as Minecraft Code. Here is a break down of what the configuration file does:
“shell_cmd”: “smelt compile $file –copy”
This is the command we’re going to run through a command prompt (shell), which…if you did your reading…you already know. $file directs the shell to the file you currently have open, which plays beautifully in how Smelt works.
This settings tells Sublime we want to run a shell command.
This setting tells Sublime to look at what syntax is being used for the file currently open. In our case, we’re looking for <file>.mcc.
Configuring build systems is a essential part of many programming languages. What you’ve really done is asked Sublime to run your CODE through a COMPILER. The only other step is to paste your compiled code into a Command Block and activate it.