BennyDioxide / fabric-language-clojure

Fabric language module for Clojure.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fabric-language-clojure

Fabric language module for Clojure. Adds support for Clojure exclusive entrypoints (TODO) and bundles the Clojure’s standard library.

Usage

Dependency

Add it as a dependency to your Gradle project: (TODO)

Adapter (TODO)

Use the clojure adapter for your mod by setting the adapter property in the fabric.mod.json file. Remember to the add a dependency entry to your fabric.mod.json file:

{
    "schemaVersion":  1, 
    "entrypoints": {
        "main": [
            {
                "adapter": "clojure",
                "value": "namespace/var"
            }
        ]
    },
    "depends": {
        "fabric-language-clojure": "*"
    }
}

For more info reference the fabric.mod.json documentation.

Do not forget to set the schemaVersion to 1 or it will fall back to schema 0 and will not attempt to load entrypoints.

Entrypoint samples

Kind Entrypoint definition Code
Class reference
"mymod.MyMod"

or

{
  "adapter": "clojure",
  "value": "mymod.MyMod"
}

(TODO)

(ns mymod
    (:gen-class
      :name mymod.MyMod
      :implements [net.fabricmc.api.ModInitializer]))
(defn -onInitialize [_]) ; TODO
Function reference (TODO)
{
    "adapter": "clojure",
    "value": "mymod/init"
}
(ns mymod)
(defn init []) ; TODO

Bundled libraries

org.clojure namespace:

Available Versions

TODO

Updating README

TODO

  • Update the readme in templates/README.template.md.
  • Run ./gradlew processMDTemplates.

About

Fabric language module for Clojure.

License:Other


Languages

Language:Clojure 100.0%