Clojure Command Language

Adds a turing-complete wrapper around the command system with clojure

Clojure Command Language is a simple turing-complete wrapper for the minecraft command system using the Clojure programming language. This means that you are allowed to use things like variables, loops, conditionals, and more to execute templates of commands

 


 

 


There are two basic commands: /ccl and /cclfile

 

First is /ccl which provides access to a clojure command line. I don't recommend using this for executing commands though, as it can get quite messy (see last example in this section). Minecraft doesn't allow any slashes in commands beyond the first character, so please use '|' instead and a slash will be substituted back in before evaluation.

 

/ccl 0
=> 0
/ccl (+ 3 2)
=> 5
/ccl (defn double-it [n] (* 2 n))
=> #'clojure.core/double-it</p>
/ccl (def x 5)
=> #'clojure.core/x</p>
/ccl (double-it x)
=> 10
/ccl (let [y (+ 2 5)] (lib|exec ["say " y]))
=> [playername] 7


The second command is /cclfile which will probably be more useful. Upon first load the mod will create a directory called 'ccl_scripts' in your modpack parent directory (not /config/) where you can put your *.clj scripts. No reloading is required; once you save a file it is ready to use.

 

If you have a file, let's say, at path /my_modpack/ccl_scripts/sayhi.clj

you would call it by using the command /cclfile sayhi


 Here is an example to demonstrate the power of the mod

 

makeline.clj

(dotimes [x 50]
         (let [meta (mod x 15)]
              (lib/exec ["setblock ~" x " ~0 ~1 wool " meta])))

 

 

 


 

I recognize that Clojure isn't everyones cup of tea, but at the present I have no intention of changing the language or supporting additional languages.

 

If you would like help or you just want to hang out and chat about the mod you are welcome to join my discord server

 

The Clojure Command Language Team

GrandArtisan tier frameprofile avatar
  • 70
    Followers
  • 29
    Projects
  • 78.2M
    Downloads

More from Dark_ArcanaView all

  • Alchemistry project image

    Alchemistry

    • 23.4M
    • Mods

    Manipulation of chemical elements, inspired by Minechem

    • 23.4M
    • June 13, 2026
    • Mods
    • +3
  • AlchemyLib project image

    AlchemyLib

    • 23.4M
    • Mods

    AlchemyLib contains shared code for machines and screens. It's used by Alchemistry and other mods.

    • 23.4M
    • June 13, 2026
    • Mods
  • ChemLib project image

    ChemLib

    • 16.4M
    • Mods

    Items for all periodic elements and many chemical compounds

    • 16.4M
    • June 13, 2026
    • Mods
    • +1
  • Antimatter Chemistry project image

    Antimatter Chemistry

    • 608.8K
    • Modpacks

    You're stranded in the Antimatter Dimension, use the power of chemistry to escape it

    • 608.8K
    • November 3, 2024
    • Modpacks
    • +4
  • Alchemistry project image

    Alchemistry

    • 23.4M
    • Mods

    Manipulation of chemical elements, inspired by Minechem

    • 23.4M
    • June 13, 2026
    • Mods
    • +3
  • AlchemyLib project image

    AlchemyLib

    • 23.4M
    • Mods

    AlchemyLib contains shared code for machines and screens. It's used by Alchemistry and other mods.

    • 23.4M
    • June 13, 2026
    • Mods
  • ChemLib project image

    ChemLib

    • 16.4M
    • Mods

    Items for all periodic elements and many chemical compounds

    • 16.4M
    • June 13, 2026
    • Mods
    • +1
  • Antimatter Chemistry project image

    Antimatter Chemistry

    • 608.8K
    • Modpacks

    You're stranded in the Antimatter Dimension, use the power of chemistry to escape it

    • 608.8K
    • November 3, 2024
    • Modpacks
    • +4