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
常见问题
Clojure Command Language 支持哪些 Minecraft 版本?
Clojure Command Language 支持 Minecraft Java 版 1.12.2,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。
Clojure Command Language 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
Dark_Arcana 的其他作品
查看全部 →Alchemistry
对化学元素的操控,灵感来自 Minechem
AlchemyLib
AlchemyLib 包含机器和界面的共享代码,供 Alchemistry 及其他模组使用。
ChemLib
所有周期元素和多种化合物的物品
Speedy Hoppers
和原版漏斗类似,但速度更快!共有3个等级。

评论
登录后评论和评分