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

One Command Syntax Highlighter

by yrsegal ST2/ST3

A sublime syntax for Minecraft 1.9 One Commands.

Details

Installs

  • Total 273
  • Win 196
  • OS X 48
  • Linux 29
Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5
Windows 0 1 0 0 0 0 1 2 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 1 0 0 0 0 2 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0
OS X 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 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 1 0 0

Readme

Source
raw.​githubusercontent.​com

OneCommandSublimeSyntax

A sublime syntax for the One Command generator by myself and destruc7i0n.

PackageControl page

What it adds

Commands

minecraft_onecc_instant

Generates a self-activating one-command contraption from the current file.

minecraft_onecc_manual

Generates a manually-activated one-command contraption from the current file.

minecraft_sort_selectors

Sorts any entity/player selector tags within the selection by alphabetical order.

minecraft_onecc_format

Explodes the commands selected, using \ syntax to keep them in the same line in the eyes of the generator.

minecraft_onecc_unformat

Compresses \ syntax down to normal lines.


Language

source.one_command

A syntax highlighter for the special syntax accepted by the generator. Uses the file extension .1cc.

The Syntax

Most of the differences between 1CC syntax and regular commands lie in the prepends.

  • INIT: as a prepend will make the command only run once, when you run the command.
  • COND: as a prepend will make the command only run if the previous one was successful. Not recommended to use on the first command, nor the first INIT: command.
  • REPEAT: as a prepend will make the command in a repeating command block. This is included to allow for different-speed clocks, and similar functions.
  • BLOCK: as a prepend will use the following command (format minecraft:BLOCKNAME:DATA) as a normal block instead of a command. This can be used to visually seperate parts of a module; remember that REPEAT: must be used afterwards to carry the signal.

\ appended to the end of a line will append the next line to the current line.

There's also the DEFINE: syntax, similar to the C #define directive. This allows simpler-to-read blocks of code to be written.
The syntax is DEFINE: identifier replacewith. You can then use this by calling out, anywhere in your code, $identifier.
As with C, DEFINE: can be used to make macros. For example, DEFINE: example(argument) say |argument| and $example("hello") will give you say hello. There's also UNDEFINE: which will remove that variable's definition.

IMPORT: will import the .1cc file of the same name. IMPORT: test will import the file named test.1cc.