https://github.com/txmx/flcl
Fabric Language Adapter for Clojure
https://github.com/txmx/flcl
Last synced: about 1 year ago
JSON representation
Fabric Language Adapter for Clojure
- Host: GitHub
- URL: https://github.com/txmx/flcl
- Owner: txmx
- License: mit
- Created: 2024-04-22T21:31:11.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-24T00:34:14.000Z (about 2 years ago)
- Last Synced: 2025-02-15T08:18:50.447Z (over 1 year ago)
- Language: Java
- Size: 13.7 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This is a **F**abric **L**anguage Adapter for **Cl**ojure.
# Usage
Mixins in Clojure are used almost the exact same way they're used in Java. More differences will arise once the code allows for more Clojure-fication of the macro. Targets must have their parameter types and return type defined concretely, exactly how the injection expects the layout to be. Note that the first parameter on non-static method targets will contain the `this` for your target class.
```clojure
(mixin MinecraftServer
(:modify-arg ^{:at (at :new :target "net/minecraft/server/ServerMetadata")
:ordinal 0}
^Text createMetadata [self ^Text _] (Text/of "hello world")))
```