3.2 KiB
Contributing to Luminol
English | 中文
We're glad that you want to contribute to our project!
In general, our review of pull requests is very lenient.
And if you can follow the rules below, we can complete the review faster.
Please fork using your personal account
We regularly merge existing PRs.
If there are some small problems, we'll help you solve them by editing your PR.
But, if your PR is from an organization, we can NOT edit your PR, so we must merge your PR manually.
So, don't use organization accounts for fork!
See also This issue, and then you'll know why we can't edit PRs from organizations.
Development Environment
Before coding, you need these pieces of software / tools as Dev Environment.
gitJDK 21 or higher
Understanding "Patches"
Luminol uses as the same patching system as Paper,
and has been divided into two directories for the purpose of modifying different parts of it:
luminol-api- Modifications toFolia-API/Paper-API/Spigot-API/Bukkit.luminol-server- Modifications to Minecraft Official Server's source logic.
The patching system is based on git, and you can learn about it at here: https://git-scm.com/docs/gittutorial
If you have forked the main repository, then you should follow the steps below:
- Clone your repository to local
- Run Gradle's
applyAllPatchestask in your IDE or terminal (You can run./gradlew applyAllPatchesdirectly in terminal.) - Enter
luminol-apiandluminol-serverdirectory to carry out modifications.
BTW, luminol-api and luminol-server and are not normal git repositories.
- Before applying patches, the base will point to unmodified source code.
- Every commit after the base is a patch.
- Only commits after the last commit of Paper will be considered as Luminol patches.
Adding new patches
It's very easy to add patches by following the steps below:
- Modify the code of
luminol-apiandluminol-server - Add these changes to the local git repository (For example,
git add .) - Commit these changes using
git commit -m <Commit Message>(PS: do not commit new-created files) - Run Gradle's task
rebuildAllServerPatchesto convert your commits to a new patch - Run Gradle's task
fixupPaperApiFilePatchesto generate newly created files to new patches (PS: do not commit again before you run this task) - Push your patches to your repository
After pushing, you can open a PR to submit your patches.
Modifying patches
You can modify an existing patch by following the steps below:
- Modify code at HEAD
- Run
git commit -a --fixup <hash>in your terminal to make a fix-up commit (PS: do not commit changes of luminol-created files)- If you want to edit the commit message, replace
--fixupwith--squash.
- If you want to edit the commit message, replace
- Run
git rebase -i --autosquash baseto rebase automatically, then just type:qto close the confirm page - Run Gradle's task
rebuildAllServerPatchesto modify existing patches - Run Gradle's task
fixupPaperApiFilePatchesto regenerate luminol-created files to patches (PS: do not commit again before you run this task) - Push and PR again