ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Marshal Command Code

by nlipiarski ALL

Syntax highlighting for Minecraft Commands

Details

Installs

  • Total 1K
  • Win 971
  • Mac 151
  • Linux 74
Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1 Feb 29 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Marshal Command Code: A Syntax Highlighter

Created by Nathan Liparski with input and testing by Moesh and Maxaxik.

Using MCC Will Make Your Code Maintainable

Latest News v1.13 of Minecraft: Java Edition brought many things to the table and MCC stepped up to add many improvements of its own. The new version is now based on Minecraft's own command parser, Brigadier. With this change, we've also fazed out Smelt support. (Sorry Gnasp)

What is Marshal Command Code?

Marshal Command Code is a syntax highlighter built for Sublime Text! Our goal is to provide practical highlighting to support as many themes as possible. We attempt to strike a balance between categorization and readability, meaning the code highlights the relevant parts of the logic while checking for errors in the rigid structure of NBT, JSON, the scoreboard, and commands themselves.

Well, what does it look like?

No Syntax Highlighting Nate's Special Color Scheme. Sixteen Color Scheme. Monokai Color Scheme. Breakers Color Scheme.

Installation

Sublime is an extremely powerful, but kind of complicated, text editor. Learning how to use it effectively will be key to keeping your code maintainable.

Instructions

Installing Package Control can be scary, but just follow the instructions carefuly. You'll be OK.

  1. Install Sublime
  2. Install Package Control Plugin (double-check your Sublime version)
  3. With Sublime opened, press Ctrl+Shift+P to open the Command Palette
  4. Type “install package” into the Command Palette and select “Package Control: Install Package”
  5. Type “Marshal Command Code” to filter the packages and select “Marshal Command Code Syntax Highlighter”

Now any file with an .mcc or .mcfunction extension will use the Marshal Command Code syntax highlighting.

If you run into any issues, feel free to send an email to Moesh with the details or open an issue on the github issue page.

What If You Want to Make Sure Your Color Scheme Works With MCC

The first thing you should know is that MCC already automatically converts color schemes on its own, so you won't have to do anything if you don't want to. If you really want to make sure your color scheme works with MCC, continue reading.

There are six scopes you will need to add and one you should propably already have in your color scheme. 1. mccconstant: Numbers, true/false, relative coords, and suffixes in nbt values will all have this scope. 2. mcccoment: Comments 3. mccstring: Any quoted or unquoted strings (e.g. usernames) will have this scope 4. mcccommand: All commands as well as any operators such as =, <, *=, etc. 5. mccentity: Entity selectors as well as specific entities such as armor_stand will get this scope 6. mccliteral: This scope is applied to keywords like merge, grant, set 7. invalid.illegal or invalid: Like I said above, most color schemes already have this one.

While usually you just have to set the foreground color when styling your scopes, because of the way MCC and Sublime work you also have to set the background parameter for all of the mcc scopes. The background color should be a color that is just one away in red, green, or blue from whatever you chose as the background color. Be aware that if your hex color ends in two zeros or four zeros you can not just subtract one from the hex value. For example, say you chose #090300, a nice gray, as your background color. If you subtract one from this, you get #0902FF which is a dark blue. What you should do instead is subtract one from the middle two set of digits to get #090200 which is a color imperceptibly different from your original color.

The final thing that you need to do is add “(MCC)” to the name string within the p list for your color scheme or put “(MCC)” in the actual file name of your scheme. It is important that you write (MCC) in all caps or else it won't be recognized as a compatible color scheme.