Prerequisites
Before opening the project, make sure you have the following installed:- Oracle JDK 21 — specifically Oracle JDK 21 is required (not OpenJDK)
- IntelliJ IDEA Community Edition or higher (recommended IDE)
Required IDE plugins
Install these plugins in IntelliJ IDEA before importing the project:| Plugin | Required | Link |
|---|---|---|
| Project Lombok | Required | plugins.jetbrains.com/plugin/6317-lombok |
| Minecraft Development | Recommended | plugins.jetbrains.com/plugin/8327-minecraft-development |
Setup
Install Oracle JDK 21
Download and install Oracle JDK 21 from oracle.com/java/technologies/downloads.Verify the installation:The output should show
java version "21".Install the Lombok plugin
In IntelliJ IDEA, open Settings → Plugins, search for Lombok, and install the Project Lombok plugin.Restart the IDE when prompted.
Enable annotation processing
Lombok requires annotation processing to be enabled. In IntelliJ IDEA:
- Open Settings → Build, Execution, Deployment → Compiler → Annotation Processors
- Check Enable annotation processing
- Click OK
Install the Minecraft Development plugin (optional)
In Settings → Plugins, search for Minecraft Development and install it. This plugin provides Minecraft-specific code assistance and inspections.
Import the project
Open IntelliJ IDEA and select Open. Navigate to the project root and select the
build.gradle file. When prompted, choose Open as Project.Gradle will sync and download all dependencies automatically.Set the Gradle JVM to Java 21
After importing, verify that Gradle is using Java 21:
- Open Settings → Build, Execution, Deployment → Build Tools → Gradle
- Under Gradle JVM, select your Oracle JDK 21 installation
- Click OK and let Gradle re-sync if prompted
Run the game from the IDE
After the Gradle sync completes, IntelliJ IDEA will have the following run configurations available:
Select a configuration from the run dropdown in the toolbar and click Run.
| Configuration | Description |
|---|---|
runClient | Launches the Minecraft client with the mod loaded |
runServer | Launches a headless Minecraft server (--nogui) |
runGameTestServer | Runs all registered game tests, then exits |
runData | Runs data generation, outputting to src/generated/resources/ |
Source and Javadoc downloads
The project is configured to automatically download sources and Javadoc jars for all dependencies. This is handled by theidea block in build.gradle: