Skip to content

A language/compiler to create easy to read formatted mcfunction files for Minecraft datapacks.

License

Notifications You must be signed in to change notification settings

MC-Language/MC-Language

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MC-Language

Minecraft Language is a compiler from a custom language mcl/mclang to Minecraft's datapack functions mcfunction.

Example:

package example {

    @Event("minecraft:load")
    func test() {
        // Produces output 'Hello, World!' in chat
        hello(input = "world")
        // Produces output 'Hello, default!' in chat
        hello()
    }
    
    macro hello(input: string = "default")
      -> "say Hello, ${input}!";
}

The above will produce the following output:

  • A load.json file with the content:
     {
        "values": [
          "pack:example/test"
        ]
     }
  • A example/test.mcfunction file with the content:
     say Hello, World!
     say Hello, default!

About

A language/compiler to create easy to read formatted mcfunction files for Minecraft datapacks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages