-
Notifications
You must be signed in to change notification settings - Fork 1
MCIL
MCIL is the intermediate language that is generated by the MCA compiler. It provides a list of branches, commands, jumps, delays, and other command structures.
Various MCIL assemblers are available. Their job is to convert an MCIL-formatted file into actual in-game blocks, be it by creating an MCEdit schematic, creating an 'installation' command-block, or some other means.
MCIL is a specially-formatted JSON file. It has a root array element which contains each 'branch'. The branches ID is the index in this array.
Each branch is an array, containing the individual instructions. These are objects, which all have a type
property, specifying the type of instruction. Other properties on the object are determined by the type.
The MCIL types are:
-
command - has properties
command
andparams
, for a command to be run in a Command Block. -
wait - has property
duration
, waits that many ticks until running the next instruction. -
branch - has a property
id
, starts executing the specified branch as well as any further instructions in this branch.
Example MCIL file:
[
[
{
"type": "command",
"command": "testforblock",
"params": "1 1 1 wool hi"
},
{
"type": "wait",
"duration": 5
}
{
"type": "command",
"command": "testforblock",
"params": "1 1 1 sign -1 {\"Text1\":{\"text\":\"cool\"},\"Text2\":{\"text\":\"yeah\"},\"Text3\":{\"text\":\"wow\"},\"Text4\":{\"text\":\"nice\"}}"
}
]
]