Documentation map
Follow this development path to create a project and produce a datapack. The sidebar groups pages by development task and language feature.
Complete a project
- Create a project: choose an ordinary project or a Java MNI project.
- Develop in IDEA: edit, organize saved code, synchronize dependencies, and run tasks.
- Configure the project: select the Minecraft version, directories, and compiler options.
- Manage dependencies: add libraries and use lock files.
- Build and inspect IR: find the datapack and trace compilation.
Find a language feature
| Task | Guide |
|---|---|
| Declare variables, constants, and type aliases | Variables and types |
Convert numbers and understand as and assignment | Conversions and type views |
| Define functions, default arguments, and extension syntax | Functions, Defaults and extensions |
Use callbacks, implicit it, and trailing lambdas | Lambdas and function types |
| Transform, select, and accumulate values | Collection callbacks |
| Use read-only lists, NBT arrays, and integer ranges | Containers and ranges |
| Read and write game scores and NBT | ScoreRef and NBTRef |
| Select entities, change identity and position, and access passengers | Entities and contexts |
| Distinguish absent data from zero and read command results | Reading results |
| Define structured data and constructors | Data templates |
| Control property access | Properties and operators |
| Name a fixed set of choices | Enumerations |
| Share singleton state and type-related behavior | Singletons and companion objects |
| Use inheritance, abstract methods, and multiple parents | Inheritance |
| Write functions for several types | Generic functions and type parameters |
| Select object field types | Generic data templates |
| Supply fixed numeric configuration | Compilation parameters and known values |
| Specify generic parameter direction | in and out |
| Generate code for multiple Minecraft versions | Version conditions |
Learn MNI
Start with a complete project. Read these pages in order:
- Java MNI introduction: create a project and bind a Java method to an MCFPP function.
- Parameters and results: receive ordinary and compilation parameters, then return MCFPP values.
- Generate commands: produce operations that execute in the game.
- Gradle and Java tests: configure dependencies and tests.
For libraries that combine expressions, loops, or user callbacks, continue with MNI macro introduction. It starts with call preparation, then covers parameters, callbacks, Minecraft operations, and template processors.
Read the API reference for annotation fields and entry signatures. Read Troubleshooting for tool configuration and synchronization problems.