Requirements
Before you begin, ensure you have the following software installed:Install Git
Install
git using your package manager:- Debian/Ubuntu/WSL:
apt install git - macOS/Linux:
homebrew install git
Install Java 21 JDK
Paper requires JDK 21 to build. We recommend Adoptium builds for most operating systems.
Paper uses Gradle’s Toolchains feature, allowing you to build with only JRE 17 or later installed. Gradle will automatically provision JDK 21 for compilation if needed.
Docker Setup
If you’re compiling with Docker, use Adoptium’seclipse-temurin images:
Use a Personal Fork
Initial Setup
Apply Patches
Apply the existing patches to set up your development environment:
On Windows, remove the
./ from the beginning of gradlew commands: gradlew applyPatchesUnderstanding the Patch System
Unlike the API and its implementation, modifications to Minecraft source files are done through patches. These patches are split into three different sets:sources: Per-file patches to Minecraft classesresources: Per-file patches to Minecraft data filesfeatures: Larger feature patches that modify multiple Minecraft classes
The
paper-server/src/minecraft directory is not a traditional git repository. Its initial commits are the decompiled and deobfuscated Minecraft source files. Per-file patches are applied on top as a single large commit, followed by individual feature-patch commits.Understanding Git
Since the entire patch structure is based on git, a basic understanding is required. New to git? Check out the official Git tutorial.Platform-Specific Notes
Windows Users
WSL 2 is available in Windows 10 v2004 (build 19041) or higher. Check your version by runningwinver in the run window (Windows key + R).
Setting up WSL 2:
- Follow the official WSL installation guide
- Install Ubuntu from the Microsoft Store
- Install required tools:
- Clone the repository and work within WSL
IntelliJ IDEA Tips
For the best development experience with IntelliJ IDEA:-
Disable automatic sync under
Settings > Appearance & Behavior > System Settings:- Disable
Sync external changes: Periodically when the IDE is inactive (experimental) - This prevents the IDE from attempting to reindex files while patches are applying
- Disable
-
Disable project reopening (optional):
- Disable
Reopen projects on startupto avoid freeze loops
- Disable
Next Steps
Now that you have your development environment set up, you’re ready to start making changes:- Learn about creating and modifying patches
- Review the code formatting guidelines
- Understand the pull request process