CraftBukkit modifications and Bukkit API additions that fix bugs, add new features, and improve the quality of life
Public build server: https://build.oc.tc/job/SportBukkit/
Build everything from scratch: ./build.sh
The SportBukkit binary will be located in build/CraftBukkit/target
Generate patched SportBukkit source code: ./prepare-build.sh
Generated source will be in build/Bukkit and build/CraftBukkit
Compile SportBukkit from source: ./compile.sh
Rebuild SportBukkit patches from source: ./rebuild-patches.sh
Remove all generated files, including the SportBukkit source: ./clean.sh
This is roughly the process used to rebase SportBukkit to an updated upstream CraftBukkit.
- Create a branch of this repo called
rebase-(version)
e.g.rebase-1.2.3
. - Checkout the
upstream
branch ofbuild/Bukkit
andbuild/CraftBukkit
and ensure they have clean work trees. - Delete the
work
folder. - Reset the submodules
builddata
,base/Bukkit
, andbase/CraftBukkit
to the latest upstream master. - In
version.sh
, updateNMS_VERSION
andNMS_MD5
to the latest values (running remap-nms.sh with the wrong MD5 will show you the right one). - Run
remap-nms.sh
,decompile-nms.sh
, andapply-cb-patches.sh
, in that order. These should all run without any conflicts. - At this stage, you have the latest CraftBukkit present and are ready to start the actual rebasing.
This is a good time to create an initial commit on the rebase branch, with just the submodule and
version.sh
changes. - Run
apply-sb-patches.sh
. This will attempt to apply the SportBukkit patches in theBukkit
andCraftBukkit
folders to the new CraftBukkit. Assuming there have been upstream changes, many of these patches will fail and you will need to resolve the conflicts. - For each conflict, one of the repos
build/Bukkit
orbuild/CraftBukkit
will be in agit am
session, waiting on conflict resolution. Use the standard git merge process to resolve the conflict, and typegit am --continue
to continue applying patches. - Along the way, you can run
rebuild-patches.sh
to capture your progress in the patch files. You should delete all the patches before regenerating them, so that renamed/renumbered patches get cleaned up properly. - When you get to the end of the Bukkit patches, rebuild them and then run
apply-sb-patches.sh
again to continue with the CraftBukkit patches. - The first CraftBukkit patch is strictly for importing NMS files verbatim. To recreate this patch, just copy the latest NMS version of each file
in the patch from
work/nms-src
tobuild/CraftBukkit/src/main/java
. This patch should always be updated, even if there are no merge conflicts. - The second CraftBukkit patch is strictly for fixing decompile errors. This patch should only make minimal changes to the files in the first patch to make them compile.