Esya Bekasova
04/27/2026, 4:05 PM@Schema of classes and members you're working with. This schema powers a high-level DSL that hides the verbosity of Mixins behind type-safe, generated wrappers.
• Idiomatic Kotlin Wrappers: I’ve re-imagined core Mixin mechanics to feel like native Kotlin. For example:
â—¦ Method Injection: While standard Mixins force you to pass every single argument even if you don't need them, Lapis uses Kotlin's default arguments to call original logic, keeping your code clean and focused.
â—¦ Cancellation: Instead of manually managing return logic after a cancellation, Lapis provides a wrapper that returns Nothing, naturally terminating the flow.
• Automated Logic Sharing: Usually, modders have to manually create and implement interface injections to access Mixin logic from their main code. Lapis removes this boilerplate entirely by automatically generating these interfaces and providing Kotlin extensions directly on the game classes.
• Automatic Configuration: Lapis automatically generates required Mixin json configs and AW/AT to handle class and member visibility, so you don't have to maintain these files manually.
• Advanced Pipeline: The processor is built as a multi-stage pipeline (Parser -> Validator -> Transformer -> Generator). To accurately parse functional types, I even had to go beyond the standard KSP API and dive into PSI.
• Custom Kotlin2JavaPoet Converter: Since Mixins must stay in Java, I built a custom converter to translate KotlinPoet types into JavaPoet types.
The project is in active development! I am currently refactoring the internal IR and working on:
• Shadow Support: Coming very soon! Automated generation of shadow fields and methods to access game class members.
• Escape Hatch: Support for writing full Mixins in Kotlin for those who need total control. This involves a complete converter that translates the entire Kotlin Mixin class into its Java counterpart, keeping all automated interface and extension generation features intact.
I’m happy to chat about KSP in the thread! And if you’re into modding, I’d love to hear your thoughts and suggestions on how to make the DX even better.
(Although this is my first KSP-based tool, it’s already powering several of my mods currently running on thousands of players' machines...)
GitHub: https://github.com/Recrafter/lapisCLOVIS
04/28/2026, 7:28 AMEsya Bekasova
04/28/2026, 1:53 PMEsya Bekasova
07/30/2026, 6:41 AM