promotional bannermobile promotional banner

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

profile avatar
  • 68
    Followers
  • 29
    Projects
  • 77.5M
    Downloads

More from Dark_ArcanaView all

  • Antimatter Chemistry project image

    Antimatter Chemistry

    • 604.5K
    • Modpacks

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

    • 604.5K
    • November 3, 2024
    • Modpacks
    • +4
  • Volcano Block project image

    Volcano Block

    • 849.1K
    • Modpacks

    A skyblock experience in the heart of a volcano

    • 849.1K
    • November 2, 2024
    • Modpacks
    • +2
  • Glacial Awakening project image

    Glacial Awakening

    • 223.1K
    • Modpacks

    You wake up in a small, dark cavern deep within a glacier. Maybe you can find your way out of the glacier, but that's only the first challenge...

    • 223.1K
    • August 4, 2024
    • Modpacks
    • +2
  • SmoothStep project image

    SmoothStep

    • 19.7K
    • Mods

    This mod allows you to smoothly step up blocks without auto-jump.

    • 19.7K
    • February 22, 2024
    • Mods
    • +1
  • Antimatter Chemistry project image

    Antimatter Chemistry

    • 604.5K
    • Modpacks

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

    • 604.5K
    • November 3, 2024
    • Modpacks
    • +4
  • Volcano Block project image

    Volcano Block

    • 849.1K
    • Modpacks

    A skyblock experience in the heart of a volcano

    • 849.1K
    • November 2, 2024
    • Modpacks
    • +2
  • Glacial Awakening project image

    Glacial Awakening

    • 223.1K
    • Modpacks

    You wake up in a small, dark cavern deep within a glacier. Maybe you can find your way out of the glacier, but that's only the first challenge...

    • 223.1K
    • August 4, 2024
    • Modpacks
    • +2
  • SmoothStep project image

    SmoothStep

    • 19.7K
    • Mods

    This mod allows you to smoothly step up blocks without auto-jump.

    • 19.7K
    • February 22, 2024
    • Mods
    • +1