-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Lapis is a KSP-powered engine for Minecraft modding that allows you to write Mixins in Kotlin with a declarative, high-level design, strong typing, and a type-safe DSL with compile-time validation.
If you need setup instructions, look here.
This project is for beginners in modding who find traditional Mixins difficult to understand, as well as for experienced developers who tired of writing the same boilerplate or updating multiple places after every Minecraft update.
Instead of forcing you to manage complex bytecode transformers, Lapis operates on Intent-Based Design:
- You state your intention (what you want to change), and Lapis already knows how to correctly find the instruction in the bytecode.
- Optimal Code Generation: Lapis automatically uses the best ways to modify or wrap code (like utilizing MixinExtras) and prohibits the most brittle, "dirty" approaches.
- Opinionated Safety: Lapis takes full control, eliminating unreliable methods and using best practices as the basis for code generation. You change only what is safe to change, while still covering as much Mixin functionality as possible.
- Zero Runtime Overhead: Lapis is built to not create dependencies at runtime. You don’t need to add any mod APIs. All necessary Java mixin classes, JSON configs, and AW/AT are generated directly within your project.
- Modern UX: It provides a completely different experience built on @Hook functions in Kotlin, moving away from low-level mixin methods in Java.
In this wiki, I’ll explain how to use Lapis, show what it generates, and explain why certain decisions were made during its design. I want to show you the "why" behind the architecture, not just the "how to use".
Examples in this wiki are based on Minecraft 26.1.2 using official mappings.