This guide introduces how you compile a Slimefun addon on GitHub, without the need to install anything extra on your computer.
You will need to have:
- A modern browser.
- A good internet connection.
- A GitHub account (click here to sign up if you don't have one yet)
Most open-source Slimefun addons are hosted on GitHub.
With GitHub Actions, you can compile the addon online, and download the build artifacts.
In this guide, we will use SlimeTinker as example.
- In the official wiki's addon list (link), you can find the "Source code" column.
Find the addon you want to compile, and click on the corresponding "Source code" to open the addon's github repository.
For SlimeTinker, you should be at this page:
https://github.com/Sefiraat/SlimeTinker
- Next, click on
. You will be redirected to "Create a new fork" page.
Just keep everything default, and click on the green "Create fork" button.
- Before doing this step, you need to identify the project type of the addon.
If you can see a pom.xml
in the root of the project, it is a maven project.
If you can see a build.gradle
or build.gradle.kts
in the root of the project, it is a gradle project.
- Now, click on "Add file" then "Create new file".
In "Name your file...", copy and paste .github/workflows/custom-fork-build.yml
Then, according to project type, find "maven.yml" or "gradle.yml" in this gist, copy and paste the content.
- When you finish all the things above, click on .
Keep everything default, click on to finish this step.
Click on the green button to enable actions on your fork.
- You should be able to find an action called "Custom Fork Build". Click on it, and you will see the following page.
- Click on "Run workflow", make sure the branch is either
master
ormain
, then click on the green "Run workflow".
Wait for a few seconds, and refresh the page. You should see a new workflow run.
- Click on the workflow run, you can see it is still running. Be patient and wait for compile to finish.
Important
If the compile fails, you may need to have some extra efforts on fixing the build.
Ask in Slimefun discord and provide the fork repository link. DO NOT just say I am having issues compiling the addon and not providing anything useful.
- When the compiling is finished, you will be able to see the artifacts. Click on the artifact name to download.
Note that, the downloaded file is a zip, and the addon jar should be within the zip file.
If it is a Maven project, there will be usually a file named "-UNOFFICIAL.jar" or "-MODIFIED.jar", this is the jar file you need. The other files, that their name may start with "original-" or ends with "sources", "javadocs", should be ignored.
If it is a Gradle project, according to different build script setup, you may see 1-2 files. Usually, if there are 2 files, the one ends with "-all" is what you need.
Anyways, if you get confused within this part, ask for help in discord, and BE PATIENT.
Note
You may get help about how to get a custom build.
But if you have issues with the content of custom build, DO NOT report them, as you are using a not supported version.